Complete the dependencies of explicit patches when pulling

pmeunier
Dec 16, 2023, 2:21 PM
NGRJOJE7CA7655Z7VVH74W2OUVAKBC7ZGZSI5AYZS2WZP4LN3IVQC

Dependencies

  • [2] IPU65ECU Avoid using "t" to distinguish tags and changes in the editor
  • [3] UOAHH3CC pull: skip editor if changes were explicitly passed
  • [4] 3E2KY6Y4 Deterministic ordering of pulled patches
  • [5] 44BN7FWS Do not output files introduced by patches that were not applied during a push
  • [6] BE7GUCI2 Completing dependencies only with changes the remote does not have
  • [7] EUZFFJSO Updating Pijul with the latest changes in Libpijul
  • [8] DO2Y5TY5 Tag synchronisation
  • [9] IVLLXQ5Z Improved push/pull reporting
  • [10] I52XSRUH Massive cleanup, and simplification
  • [11] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [12] M5FK3ABT Complete dependencies when pushing and pulling
  • [13] 3OW3YNZX Dependencies completion in push and pull, updated after stabilisation of remote caches
  • [14] MU5GSJAW Partial push and pull (WARNING: breaks the existing protocol)
  • [15] 7HOBLRD4 Fixing remote push/pull
  • [16] BBKV6VMN Fixing push/pull messages, and do not reverse the changes to download/upload
  • [*] 3KRGVQFU Do not update the mtime of unmodified files

Change contents

  • replacement in pijul/src/commands/pushpull.rs at line 299
    [2.168][5.16:90](),[5.158][5.16:90]()
    let comp = complete_deps(&repo.changes, &to_upload, &d)?;
    [2.168]
    [5.232]
    let comp = complete_deps(&repo.changes, Some(&to_upload), &d)?;
  • replacement in pijul/src/commands/pushpull.rs at line 440
    [5.10157][3.0:50](),[3.50][5.146:225](),[5.120145][5.146:225](),[5.225][5.38:71](),[5.71][2.169:253](),[2.253][5.91:167](),[5.566][5.91:167](),[5.167][5.642:685](),[5.187][5.642:685](),[5.1075][5.642:685](),[5.10185][5.642:685](),[5.642][5.642:685](),[5.685][5.2578:2610](),[5.2610][5.716:734](),[5.716][5.716:734](),[5.734][5.226:293](),[5.293][5.793:808](),[5.793][5.793:808]()
    if !self.all && self.changes.is_empty() {
    let mut o = make_changelist(&repo.changes, &to_download, "pull")?;
    to_download = loop {
    let d = parse_changelist(&edit::edit_bytes(&o[..])?, &to_download);
    let comp = complete_deps(&repo.changes, &to_download, &d)?;
    if comp.len() == d.len() {
    break comp;
    }
    o = make_changelist(&repo.changes, &comp, "pull")?
    };
    [5.10157]
    [5.22214]
    if self.changes.is_empty() {
    if !self.all {
    let mut o = make_changelist(&repo.changes, &to_download, "pull")?;
    to_download = loop {
    let d = parse_changelist(&edit::edit_bytes(&o[..])?, &to_download);
    let comp = complete_deps(&repo.changes, Some(&to_download), &d)?;
    if comp.len() == d.len() {
    break comp;
    }
    o = make_changelist(&repo.changes, &comp, "pull")?
    };
    }
    } else {
    to_download = complete_deps(&repo.changes, None, &to_download)?;
  • edit in pijul/src/commands/pushpull.rs at line 501
    [18.839]
    [5.29394]
    debug!("to_download {:?}", d);
  • replacement in pijul/src/commands/pushpull.rs at line 602
    [5.854][5.30515:30536]()
    original: &[CS],
    [5.854]
    [5.30536]
    original: Option<&[CS]>,
  • replacement in pijul/src/commands/pushpull.rs at line 605
    [5.30590][5.237:295](),[5.2937][5.237:295]()
    let original: HashSet<_> = original.iter().collect();
    [5.30590]
    [4.381]
    debug!("complete deps {:?} {:?}", original, now);
    let original_: Option<HashSet<_>> = original.map(|original| original.iter().collect());
  • replacement in pijul/src/commands/pushpull.rs at line 608
    [4.439][5.354:411](),[5.354][5.354:411](),[5.411][4.440:503]()
    let mut result = Vec::with_capacity(original.len());
    let mut result_h = HashSet::with_capacity(original.len());
    [4.439]
    [5.411]
    let mut result = Vec::with_capacity(original.unwrap_or(now).len());
    let mut result_h = HashSet::with_capacity(original.unwrap_or(now).len());
  • replacement in pijul/src/commands/pushpull.rs at line 625
    [4.628][4.628:698]()
    if original.get(&CS::Change(d)).is_some() && is_missing {
    [4.628]
    [5.638]
    debug!("complete_deps {:?} {:?}", d, is_missing);
    let is_missing = if let Some(ref original) = original_ {
    // If this is a list we submitted to the user for editing
    original.get(&CS::Change(d)).is_some() && is_missing
    } else {
    // Else, we were given an explicit list of patches to pull/push
    is_missing
    };
    if is_missing {
  • edit in pijul/src/commands/pushpull.rs at line 647
    [5.1469]
    [5.1469]
    debug!("result {:?}", result);