Debugging of diff: show utf8 str when possible

pmeunier
May 5, 2022, 8:57 AM
NAHGUOC2BWSVHVPSM64Z5PU5GJDTQHF433X7RZWYJ2VSA4ULSXDQC

Dependencies

  • [2] TGA6QXGI Initial support for binary diffs (conflicts are not yet supported in the output)
  • [3] 4DNDMC7I Fixing a number of bugs related to encodings (extra newlines + misdetection in linux2x)
  • [4] 2VXTRPO4 Custom diff separators
  • [*] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).

Change contents

  • replacement in libpijul/src/diff/mod.rs at line 99
    [2.1082][2.1082:1119]()
    debug!("old = {:?}", l);
    [2.1082]
    [2.1119]
    if log_enabled!(log::Level::Debug) {
    if let Ok(l) = std::str::from_utf8(l) {
    debug!("old = {:?}", l);
    } else {
    debug!("old = {:?}", l);
    }
    }
  • replacement in libpijul/src/diff/mod.rs at line 121
    [2.1483][2.1483:1519]()
    debug!("new: {:?}", l);
    [2.1483]
    [2.1519]
    if log_enabled!(log::Level::Debug) {
    if let Ok(l) = std::str::from_utf8(l) {
    debug!("new = {:?}", l);
    } else {
    debug!("new = {:?}", l);
    }
    }