Fixing "block error" in unrecord

pmeunier
Feb 23, 2023, 6:45 PM
BOJEBIOIRT73FEVDUZPKRIBQMP3XX2HCZQ6CIB2AGMWTGNN47JRQC

Dependencies

  • [2] 3CFU4DQN Fixing a bug in unrecord, where a patch creating an undeletion conflict would not be properly unrecorded
  • [3] GHO6DWPI Refactoring iterators
  • [4] YN63NUZO Sanakirja 1.0
  • [5] KQTD46KV Unrecord: restore files *after* having unapplied the *entire* change
  • [*] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).

Change contents

  • replacement in libpijul/src/unrecord/mod.rs at line 258
    [2.1263][2.1263:1466]()
    let u = *txn.find_block_end(channel, e.dest())?;
    e -= EdgeFlags::PARENT;
    del_graph_with_rev(txn, channel, e.flag(), u, v, e.introduced_by())?;
    [2.1263]
    [2.1466]
    if let Ok(u) = txn.find_block_end(channel, e.dest()) {
    e -= EdgeFlags::PARENT;
    del_graph_with_rev(txn, channel, e.flag(), *u, v, e.introduced_by())?;
    }
  • replacement in libpijul/src/unrecord/mod.rs at line 263
    [2.1491][2.1491:1646]()
    let w = *txn.find_block(channel, e.dest())?;
    del_graph_with_rev(txn, channel, e.flag(), v, w, e.introduced_by())?;
    [2.1491]
    [2.1646]
    if let Ok(w) = txn.find_block(channel, e.dest()) {
    del_graph_with_rev(txn, channel, e.flag(), v, *w, e.introduced_by())?;
    }
  • replacement in libpijul/src/unrecord/mod.rs at line 648
    [2.2201][2.2201:2251]()
    ws.stack.push(*txn.find_block(channel, to)?);
    [2.2201]
    [2.2251]
    if let Ok(to) = txn.find_block(channel, to) {
    ws.stack.push(*to);
    }
  • replacement in libpijul/src/unrecord/mod.rs at line 668
    [2.2923][2.2923:2994]()
    ws.stack.push(*txn.find_block_end(channel, e.dest())?)
    [2.2923]
    [2.2994]
    if let Ok(x) = txn.find_block_end(channel, e.dest()) {
    ws.stack.push(*x)
    }
  • replacement in libpijul/src/unrecord/mod.rs at line 672
    [2.3015][2.3015:3082]()
    ws.stack.push(*txn.find_block(channel, e.dest())?)
    [2.3015]
    [2.3082]
    if let Ok(x) = txn.find_block(channel, e.dest()) {
    ws.stack.push(*x)
    }