Conflict solving code (FOLDER edges)

[?]
Dec 5, 2020, 12:17 PM
7A2TSC4PAKK3WOH3DMAJASCEC6D5JLJWNFWJTEEBE4CVS4K76PPQC

Dependencies

  • [2] KVBLRDOU Concatenating edits with order conflict resolutions (if relevant), and parsing the text format of the result
  • [3] 5BRU2RRW Cleanup (debugging a crash related to trees/inodes)
  • [4] 33ANCTMF Fixing a panic when decoding a bad ChangeId
  • [5] BZSC7VMY address clippy lints
  • [6] WZVCLZKY address clippy lints
  • [7] KDF6FJRV bigger clippy refactors
  • [8] 74HX2XZD Cleanup and debugging
  • [9] I52XSRUH Massive cleanup, and simplification
  • [10] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).

Change contents

  • edit in libpijul/src/pristine/vertex.rs at line 37
    [8.526416]
    [8.526416]
    /// 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
    [3.940]
    [5.2257]
  • replacement in libpijul/src/pristine/mod.rs at line 466
    [8.42740][6.4380:4470]()
    .any(|e| e.flag.contains(EdgeFlags::BLOCK) || e.flag.contains(EdgeFlags::FOLDER))
    [8.42740]
    [8.42868]
    .any(|e| e.flag.contains(EdgeFlags::BLOCK))
  • resolve order conflict in libpijul/src/pristine/change_id.rs at line 35
    [4.154]
    [7.451]
  • replacement in libpijul/src/diff/replace.rs at line 65
    [8.781923][8.781923:781961]()
    flag: EdgeFlags::empty(),
    [8.781923]
    [8.781961]
    flag: EdgeFlags::BLOCK,
  • edit in libpijul/src/diff/replace.rs at line 83
    [8.782706][2.113:1163]()
    }
    }
    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
    [8.67684][8.67684:67774]()
    put_graph_with_rev(txn, channel, n.flag | EdgeFlags::BLOCK, up, vertex, change)?;
    [8.67684]
    [8.956816]
    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)?;