avoid outputting repo multiple times in channel switch

rohan
Oct 23, 2021, 12:42 AM
S4LQTDJIXHLNCOVARYKRDSE4H22L5HBQ3AOLYBBNCIS42OOMP24QC

Dependencies

  • [2] C4MJ7D7Q Verbose printing of conflicts to stderr
  • [3] X243Z3Y5 Recording only the required metadata (can even be changed later!)
  • [4] L4JXJHWX pijul/*: reorganize imports and remove extern crate
  • [5] V435QOJR Using path-slash to fix path issues on Windows
  • [6] LGEJSLTY Fixing output (including its uses in reset and pull)
  • [7] I24UEJQL Various post-fire fixes
  • [8] 5OGOE4VW Store the current channel in the pristine
  • [9] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [10] 3KRGVQFU Do not update the mtime of unmodified files
  • [11] QMTANHVN Reset: only output changed files
  • [12] 2RXOCWUW Making libpijul deterministic (and getting rid of `rand`)
  • [13] EUZFFJSO Updating Pijul with the latest changes in Libpijul

Change contents

  • replacement in "pijul/src/commands/reset.rs" at line 1
    [3.97650][3.192:223]()
    use std::collections::HashSet;
    [3.97650]
    [3.1289]
    use std::collections::{BTreeSet, HashSet};
  • replacement in "pijul/src/commands/reset.rs" at line 167
    [3.9905][3.9905:9967]()
    let mut paths = Vec::with_capacity(inodes.len());
    [3.9905]
    [3.9967]
    let mut paths = BTreeSet::new();
  • replacement in "pijul/src/commands/reset.rs" at line 172
    [3.10165][3.10165:10202]()
    paths.push(path)
    [3.10165]
    [3.10202]
    paths.insert(path);
  • edit in "pijul/src/commands/reset.rs" at line 177
    [3.1394]
    [3.10290]
    }
    if paths.is_empty() {
    paths.insert(String::from(""));
  • edit in "pijul/src/commands/reset.rs" at line 182
    [3.10304]
    [3.10304]
    let mut last = None;
  • edit in "pijul/src/commands/reset.rs" at line 193
    [3.10611]
    [3.10611]
    match last {
    Some(last_path) if path.starts_with(last_path) => continue,
    _ => (),
    }
  • replacement in "pijul/src/commands/reset.rs" at line 204
    [2.290][2.290:321]()
    &path,
    [2.290]
    [2.321]
    path,
  • edit in "pijul/src/commands/reset.rs" at line 212
    [2.525]
    [3.11011]
    last = Some(path)
  • edit in "pijul/src/commands/reset.rs" at line 214
    [3.11025][3.11025:11059](),[3.11059][2.526:1007](),[2.1007][3.11392:11406](),[3.11392][3.11392:11406]()
    if paths.is_empty() {
    conflicts.extend(
    libpijul::output::output_repository_no_pending(
    &repo.working_copy,
    &repo.changes,
    &txn,
    &channel,
    "",
    true,
    None,
    num_cpus::get(),
    0,
    )?
    .into_iter(),
    );
    }