Cleaner handling of binary changes in the text format

pmeunier
Dec 7, 2021, 4:04 PM
5NHRJ5PYIBAKZVFP25SL5FZC7WS2Z6Y46FVJR7XX6SH7ZJZUHJEAC

Dependencies

  • [2] 7ABOS34C Debug statements and formatting
  • [3] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [4] YDTN6BGI Touch the channel if no file was changed
  • [5] I24UEJQL Various post-fire fixes
  • [6] FGIVSUFH Fixing conflicts with the new patch parsing code, and introducing AddRoot
  • [7] I2D35LLF More accurate recording of modification time
  • [8] MQ7TZOT6 Edits can delete lines too
  • [9] 5FI6SBEZ Re-implement change printing and parsing
  • [10] SMMRGKCX Recursive file deletions: show the correct paths

Change contents

  • replacement in pijul/src/commands/record.rs at line 403
    [3.109215][3.156:194]()
    bail!("Empty change")
    [3.109215]
    [3.109248]
    if rec.has_binary_files {
    bail!("Cannot record a binary change interactively. Please use -a.")
    } else {
    bail!("Cannot parse change")
    }
  • replacement in libpijul/src/change/printable.rs at line 647
    [3.53387][3.53387:53400]()
    } else {
    [3.53387]
    [3.53400]
    } else if contents.len() <= 4096 {
  • edit in libpijul/src/change/printable.rs at line 649
    [3.53477]
    [3.53477]
    } else {
    Ok(())
  • edit in libpijul/src/change/parse.rs at line 356
    [3.74568]
    [3.74568]
    let has_encoding = encoding.is_some();
  • replacement in libpijul/src/change/parse.rs at line 361
    [3.74715][3.517:546]()
    if !vec.is_empty() {
    [3.74715]
    [2.1000]
    if has_encoding || !vec.is_empty() {