Dependencies completion in push and pull, updated after stabilisation of remote caches
Dependencies
- [2]
7HOBLRD4Fixing remote push/pull - [3]
Q45QHPO4Feedback on network stuff - [4]
MU5GSJAWPartial push and pull (WARNING: breaks the existing protocol) - [5]
EUZFFJSOUpdating Pijul with the latest changes in Libpijul - [6]
YN63NUZOSanakirja 1.0 - [7]
IVLLXQ5ZImproved push/pull reporting - [8]
BBKV6VMNFixing push/pull messages, and do not reverse the changes to download/upload - [9]
I52XSRUHMassive cleanup, and simplification - [10]
BE7GUCI2Completing dependencies only with changes the remote does not have - [11]
SLJ3OHD4unrecord: show list of changes if none were given as arguments - [12]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [13]
M5FK3ABTComplete dependencies when pushing and pulling - [14]
6WFOU7UXDo a DFS on dependencies to complete the list - [15]
44BN7FWSDo not output files introduced by patches that were not applied during a push - [16]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting).
Change contents
- edit in "pijul/src/commands/pushpull.rs" at line 221
remote_ref, - edit in "pijul/src/commands/pushpull.rs" at line 224
.. - replacement in "pijul/src/commands/pushpull.rs" at line 277
let comp = complete_deps(&*txn.read(), &remote_ref, &repo.changes, &d)?;let comp = complete_deps(&repo.changes, &to_upload, &d)?; - replacement in "pijul/src/commands/pushpull.rs" at line 421
let comp = complete_deps(&*txn.read(), &None, &repo.changes, &d)?;let comp = complete_deps(&repo.changes, &to_download, &d)?; - replacement in "pijul/src/commands/pushpull.rs" at line 554
fn complete_deps<T: TxnT, C: ChangeStore>(txn: &T,remote_changes: &Option<libpijul::RemoteRef<T>>,fn complete_deps<C: ChangeStore>( - edit in "pijul/src/commands/pushpull.rs" at line 556
original: &[libpijul::Hash], - replacement in "pijul/src/commands/pushpull.rs" at line 559
let mut now_ = HashSet::new();let mut result = Vec::new();for &h in now.iter() {let original: HashSet<_> = original.iter().collect();let mut now_ = HashSet::with_capacity(original.len());let mut result = Vec::with_capacity(original.len());let mut stack: Vec<_> = now.iter().rev().cloned().collect();while let Some(h) = stack.pop() {stack.push(h);let l0 = stack.len(); - replacement in "pijul/src/commands/pushpull.rs" at line 567[3.327]→[3.298:350](∅→∅),[2.1214]→[3.298:350](∅→∅),[3.1255]→[3.298:350](∅→∅),[3.350]→[3.12121:12181](∅→∅),[3.12181]→[3.401:463](∅→∅),[3.15077]→[3.401:463](∅→∅),[3.401]→[3.401:463](∅→∅),[3.463]→[2.1215:1247](∅→∅),[2.1247]→[3.1326:1358](∅→∅),[3.1326]→[3.1326:1358](∅→∅),[3.1358]→[2.1248:1274](∅→∅)
if let Some(ref rem) = remote_changes {if txn.remote_has_change(rem, &d.into())? {continue;}}if now_.insert(d) {result.push(d);continue;if original.get(&d).is_some() && now_.get(&d).is_none() {// The user missed a dep.stack.push(d); - replacement in "pijul/src/commands/pushpull.rs" at line 572
if now_.insert(h) {result.push(h)if stack.len() == l0 {// We have all dependencies.stack.pop();if now_.insert(h) {result.push(h);}