Conflict solving code (FOLDER edges)
[?]
Dec 5, 2020, 12:17 PM
7A2TSC4PAKK3WOH3DMAJASCEC6D5JLJWNFWJTEEBE4CVS4K76PPQCDependencies
- [2]
KVBLRDOUConcatenating edits with order conflict resolutions (if relevant), and parsing the text format of the result - [3]
5BRU2RRWCleanup (debugging a crash related to trees/inodes) - [4]
33ANCTMFFixing a panic when decoding a bad ChangeId - [5]
BZSC7VMYaddress clippy lints - [6]
WZVCLZKYaddress clippy lints - [7]
KDF6FJRVbigger clippy refactors - [8]
74HX2XZDCleanup and debugging - [9]
I52XSRUHMassive cleanup, and simplification - [10]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting).
Change contents
- edit in libpijul/src/pristine/vertex.rs at line 37
/// Is this vertex of zero length?pub fn is_empty(&self) -> bool {self.end == self.start} - resolve order conflict in libpijul/src/pristine/sanakirja.rs at line 647
- replacement in libpijul/src/pristine/mod.rs at line 466
.any(|e| e.flag.contains(EdgeFlags::BLOCK) || e.flag.contains(EdgeFlags::FOLDER)).any(|e| e.flag.contains(EdgeFlags::BLOCK)) - resolve order conflict in libpijul/src/pristine/change_id.rs at line 35
- replacement in libpijul/src/diff/replace.rs at line 65
flag: EdgeFlags::empty(),flag: EdgeFlags::BLOCK, - edit in libpijul/src/diff/replace.rs at line 83
}}Some(Record::SolveOrderConflict { change: c, local }) => {// If the last record solved a conflict, replace// the empty "solving" line with this change.if change.up_context.len() == 1 && change.up_context[0].change.is_none() {if let Atom::NewVertex(mut c) = c {c.down_context.extend(change.down_context.into_iter());c.start = change.start;c.end = change.end;self.rec.actions.push(Record::SolveOrderConflict {change: Atom::NewVertex(c),local,});return Ok(());}} else {self.rec.actions.push(Record::SolveOrderConflict { change: c, local }) - replacement in libpijul/src/apply.rs at line 354
put_graph_with_rev(txn, channel, n.flag | EdgeFlags::BLOCK, up, vertex, change)?;let flag = if !vertex.is_empty() {n.flag | EdgeFlags::BLOCK} else {n.flag - EdgeFlags::BLOCK};put_graph_with_rev(txn, channel, flag, up, vertex, change)?;