Fix the comparison between channels states when one is empty

[?]
Apr 25, 2021, 5:44 AM
WQQJLPTXGJGK2LPRV633QTPLDXE4E5N7GQ4Y7FOLSFTJBWF6GHRQC

Dependencies

  • [2] I24UEJQL Various post-fire fixes
  • [3] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [4] I52XSRUH Massive cleanup, and simplification
  • [5] QMTANHVN Reset: only output changed files
  • [6] YN63NUZO Sanakirja 1.0

Change contents

  • edit in pijul/src/commands/reset.rs at line 145
    [2.9504]
    [2.9504]
    let s: libpijul::Merkle = s.into();
  • edit in pijul/src/commands/reset.rs at line 147
    [2.9557]
    [2.9557]
    let (a, b) = if s == libpijul::Merkle::zero() {
    (None, None)
    } else {
    (Some(a), Some(b))
    };
  • replacement in pijul/src/commands/reset.rs at line 248
    [3.2166][3.2166:2181]()
    from: u64,
    [3.2166]
    [3.2181]
    from: Option<u64>,
  • replacement in pijul/src/commands/reset.rs at line 252
    [3.2300][3.9673:9746]()
    for x in libpijul::pristine::changeid_log(txn, chan, from.into())? {
    [3.2300]
    [3.9746]
    let f = if let Some(f) = from {
    (f + 1).into()
    } else {
    0u64.into()
    };
    for x in libpijul::pristine::changeid_log(txn, chan, f)? {
  • edit in pijul/src/commands/reset.rs at line 261
    [3.9851][3.2442:2497](),[3.2442][3.2442:2497]()
    if n <= from {
    continue;
    }
  • edit in libpijul/src/pristine/mod.rs at line 1892
    [3.4543]
    [3.4543]
    let mut a_was_found = false;
  • edit in libpijul/src/pristine/mod.rs at line 1899
    [3.112133]
    [3.4758]
    a_was_found = true;
  • replacement in libpijul/src/pristine/mod.rs at line 1905
    [3.4831][3.4831:4854]()
    Ok((aa, a, state))
    [3.4831]
    [3.55586]
    if a_was_found {
    Ok((aa, a, state))
    } else {
    Ok((0, 0, Merkle::zero().into()))
    }