Deleting conflict resolution vertices when the sides are deleted

[?]
Dec 6, 2020, 8:35 PM
BD5PC25AB5MKVIYDFSDGRZ4YGX4PKW4SMZ3YAYAPNA5HLDVJUR3QC

Dependencies

  • [2] KQTD46KV Unrecord: restore files *after* having unapplied the *entire* change
  • [3] HMMMKONL Fixing alive vertices
  • [4] I52XSRUH Massive cleanup, and simplification
  • [5] 5BRU2RRW Cleanup (debugging a crash related to trees/inodes)
  • [6] L5PHFTIE Minor simplification
  • [7] WZVCLZKY address clippy lints
  • [8] UBCBQ5FG Removing pijul/src/commands/checkout.rs (unused file), as well as litorg comments
  • [9] YACC5QR6 Don't delete non-block edges unless they're at the top of a block
  • [10] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [11] VO5OQW4W Removing anyhow in libpijul
  • [12] BXD3IQYN Fixing --features git
  • [13] KDF6FJRV bigger clippy refactors
  • [14] 74HX2XZD Cleanup and debugging
  • [15] ZXTHL45O address clippy lints

Change contents

  • replacement in pijul/src/commands/debug.rs at line 6
    [4.16][3.0:20]()
    use libpijul::TxnT;
    [4.16]
    [4.177836]
    use libpijul::{TxnT, TxnTExt};
  • replacement in pijul/src/commands/debug.rs at line 34
    [4.178559][3.48:58]()
    {
    [4.178559]
    [3.58]
    if let Some(root) = self.root {
    let (pos, _) = txn
    .follow_oldest_path(&repo.changes, &channel, &root)
    .unwrap();
    libpijul::pristine::debug_root(
    &txn,
    &channel.borrow(),
    pos.inode_vertex(),
    std::io::stdout(),
    true,
    )?;
    } else {
  • edit in libpijul/src/unrecord/mod.rs at line 162
    [2.372][2.372:530]()
    let mut f = std::fs::File::create("debug_unrecord").unwrap();
    crate::pristine::debug(txn, &channel, &mut f).unwrap();
  • replacement in libpijul/src/pristine/mod.rs at line 710
    [4.616291][4.388:433]()
    pub(crate) fn debug_root<W: Write, T: TxnT>(
    [4.616291]
    [4.49091]
    #[cfg(debug_assertions)]
    pub fn debug_root<W: Write, T: TxnT>(
  • edit in libpijul/src/pristine/mod.rs at line 716
    [4.49172]
    [4.17879]
    down: bool,
  • replacement in libpijul/src/pristine/mod.rs at line 727
    [4.49532][4.49532:49584]()
    if e.flag.contains(EdgeFlags::PARENT) {
    [4.49532]
    [4.49584]
    if e.flag.contains(EdgeFlags::PARENT) ^ down {
  • replacement in libpijul/src/pristine/mod.rs at line 729
    [4.49642][4.49642:49714]()
    let v = find_block_end(txn, &channel, e.dest).unwrap();
    [4.49642]
    [4.49714]
    let v = if e.flag.contains(EdgeFlags::PARENT) {
    find_block_end(txn, &channel, e.dest).unwrap()
    } else {
    find_block(txn, &channel, e.dest).unwrap()
    };
  • replacement in libpijul/src/pristine/mod.rs at line 1466
    [4.3058][4.3058:3117]()
    debug_root(txn, &channel, file.unwrap(), &mut f)?;
    [4.3058]
    [4.3117]
    debug_root(txn, &channel, file.unwrap(), &mut f, false)?;
  • replacement in libpijul/src/output/mod.rs at line 156
    [4.688970][4.3210:3292]()
    debug_root(txn, channel, child.dest.inode_vertex(), &mut f).unwrap();
    [4.688970]
    [4.689072]
    debug_root(txn, channel, child.dest.inode_vertex(), &mut f, false).unwrap();
  • replacement in libpijul/src/diff/delete.rs at line 103
    [4.809020][4.809020:809117](),[4.809117][4.593:876](),[4.876][4.809445:809513](),[4.809445][4.809445:809513]()
    match diff.marker.get(&diff.pos_a[i].pos) {
    Some(ConflictMarker::Begin) => {
    if let ConflictType::Zombie =
    diff.conflict_ends[diff.pos_a[i].conflict].conflict_type
    {
    solved_conflict_end =
    solved_conflict_end.max(diff.conflict_ends[diff.pos_a[i].conflict].end_pos)
    }
    }
    None => delete_parents(
    [4.809020]
    [4.809513]
    debug!("pos = {:?} {:?}", diff.pos_a[i].pos, diff.pos_a[i].vertex);
    let marker = diff.marker.get(&diff.pos_a[i].pos);
    if marker.is_none() || (!diff.pos_a[i].vertex.is_root() && diff.pos_a[i].vertex.is_empty())
    {
    debug!("{:?}", diff.vertex(i, pos, end_pos));
    delete_parents(
  • replacement in libpijul/src/diff/delete.rs at line 114
    [4.809674][4.809674:809709]()
    ),
    _ => {}
    [4.809674]
    [4.809709]
    )
    } else if let Some(ConflictMarker::Begin) = marker {
    debug!(
    "conflict type = {:#?}",
    diff.conflict_ends[diff.pos_a[i].conflict].conflict_type
    );
    if let ConflictType::Zombie = diff.conflict_ends[diff.pos_a[i].conflict].conflict_type {
    solved_conflict_end =
    solved_conflict_end.max(diff.conflict_ends[diff.pos_a[i].conflict].end_pos)
    }
    } else {
    debug!("conflict: {:?}", marker);
  • replacement in libpijul/src/diff/delete.rs at line 168
    [4.810684][4.0:84]()
    if graph_key.start != del_key.start && !v.flag.contains(EdgeFlags::BLOCK) {
    [4.810684]
    [4.65964]
    if graph_key.start != del_key.start
    && !graph_key.is_empty()
    && !v.flag.contains(EdgeFlags::BLOCK)
    {
  • edit in libpijul/src/diff/delete.rs at line 272
    [4.814727]
    [4.814786]
    debug!(
    "resurrect_zombies {:?} {:?} {:?} {:?}",
    r, i, end_pos, solved_conflict_end
    );
  • edit in libpijul/src/diff/delete.rs at line 325
    [4.816424]
    [4.66019]
    debug!("resurrect zombie {:?} {:?}", v, target);
  • edit in libpijul/src/alive/retrieve.rs at line 1
    [4.984582][4.984583:984638]()
    // org id hGK6MGS40qzDFMBQyv5XVltMB8aIcok+Pgym9VgR9Vk=
  • edit in libpijul/src/alive/retrieve.rs at line 7
    [4.984876][4.984876:984935]()
    // org id sYJLuP12Bb9ojQy2BgMV3s1jy9cGxExEdwA79BNti8w=
  • edit in libpijul/src/alive/retrieve.rs at line 13
    [4.985092][4.985092:985151]()
    // org id 5vWbyONVh9JXfLbAXyWtgOPI0Uw7ePLizs5Ktr69a7A=
  • edit in libpijul/src/alive/retrieve.rs at line 27
    [4.985564][4.985564:985623]()
    // org id +NO0a8x0MX1UOumulz5JeM8HzIIpUzB+FDngTJ+n9I8=
  • edit in libpijul/src/alive/retrieve.rs at line 58
    [4.986678][4.986678:986741]()
    // org id hsj9MpTqN7i3gJbLw17mqAbo+0+lz2RNkm24v+T+WvQ=
  • replacement in libpijul/src/alive/retrieve.rs at line 64
    [4.986916][4.986916:986971]()
    // org id xfKIMD6U0jHcxTiNzXKvDewGhKlvjnNe3nmaoh6nnz4=
    [4.986916]
    [4.73099]
  • replacement in libpijul/src/alive/retrieve.rs at line 71
    [4.73293][4.2084:2120](),[4.2120][4.73332:73363](),[4.73332][4.73332:73363](),[4.73363][4.987142:987158](),[4.987142][4.987142:987158](),[4.987158][4.73364:73482](),[4.73482][4.2121:2135]()
    crate::pristine::iter_adjacent(
    txn,
    &channel,
    vertex,
    EdgeFlags::PARENT | EdgeFlags::BLOCK,
    EdgeFlags::PARENT | EdgeFlags::BLOCK | EdgeFlags::FOLDER,
    )
    .next()?;
    [4.73293]
    [4.73542]
    if !is_alive(txn, &channel, vertex) {
    return None;
    }
  • replacement in libpijul/src/alive/retrieve.rs at line 98
    [4.987602][4.987602:987657]()
    // org id jpSLF26wQdmz0kBfuXYavQ2T6SBQYdE5u9SfkPOypeg=
    [4.987602]
    [4.987657]