Fixing remote push/pull
Dependencies
- [2]
6WFOU7UXDo a DFS on dependencies to complete the list - [3]
27RZYCM3Pushing/pulling from/to Nest discussions again - [4]
7SQ7COLTAdd length check to pijul remote delete - [5]
YN63NUZOSanakirja 1.0 - [6]
UDHP4ZVBFixing SSH asynchronicity issues - [7]
I52XSRUHMassive cleanup, and simplification - [8]
MU5GSJAWPartial push and pull (WARNING: breaks the existing protocol) - [9]
BE7GUCI2Completing dependencies only with changes the remote does not have - [10]
A3RM526YIntegrating identity malleability - [11]
L2VH4BYKDownloading changelists from channels without an id (Nest discussions) - [12]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [13]
Q45QHPO4Feedback on network stuff - [14]
EUZFFJSOUpdating Pijul with the latest changes in Libpijul - [15]
IVLLXQ5ZImproved push/pull reporting - [16]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [17]
M5FK3ABTComplete dependencies when pushing and pulling - [18]
BBKV6VMNFixing push/pull messages, and do not reverse the changes to download/upload - [19]
44BN7FWSDo not output files introduced by patches that were not applied during a push - [*]
5HF7C67Mpush/pull: fixed "changes" arguments
Change contents
- replacement in "pijul/src/remote/ssh.rs" at line 464
debug!("state: Id {:?}", data);debug!("state: Id {:?}", std::str::from_utf8(&data)); - replacement in "pijul/src/remote/ssh.rs" at line 560
debug!("{:?}", data);trace!("{:?}", data); - replacement in "pijul/src/remote/mod.rs" at line 313
let to_download: Result<Vec<libpijul::Hash>, anyhow::Error> = specific_changes.iter().map(|h| Ok(txn.hash_from_prefix(h)?.0)).collect();let mut to_download = Vec::new();for h in specific_changes {let h = txn.hash_from_prefix(h)?.0;if txn.get_revchanges(current_channel, &h)?.is_none() {to_download.push(h)}} - replacement in "pijul/src/remote/mod.rs" at line 322
to_download: to_download?,to_download, - replacement in "pijul/src/remote/mod.rs" at line 489
debug!("update_changelist");debug!("update_changelist_pushpull"); - edit in "pijul/src/remote/mod.rs" at line 502
debug!("id = {:?}", id); - edit in "pijul/src/remote/mod.rs" at line 505
debug!("no id, starting from scratch"); - replacement in "pijul/src/remote/mod.rs" at line 511
to_download.push(*h);if txn.get_revchanges(current_channel, h)?.is_none() {to_download.push(*h);} - edit in "pijul/src/commands/pushpull.rs" at line 259[21.913][21.913]
u.sort_by(|a, b| {let na = txn.get_revchanges(&channel, a).unwrap().unwrap();let nb = txn.get_revchanges(&channel, b).unwrap().unwrap();na.cmp(&nb)}); - replacement in "pijul/src/commands/pushpull.rs" at line 277
let comp = complete_deps(&*txn.read(), &remote_ref, &repo.changes, &to_upload, &d)?;let comp = complete_deps(&*txn.read(), &remote_ref, &repo.changes, &d)?; - replacement in "pijul/src/commands/pushpull.rs" at line 421
let comp = complete_deps(&*txn.read(), &None, &repo.changes, &to_download, &d)?;let comp = complete_deps(&*txn.read(), &None, &repo.changes, &d)?; - edit in "pijul/src/commands/pushpull.rs" at line 558
original: &[libpijul::Hash], - replacement in "pijul/src/commands/pushpull.rs" at line 560[5.2937]→[5.995:1054](∅→∅),[5.995]→[5.995:1054](∅→∅),[5.1054]→[2.0:116](∅→∅),[2.116]→[2.116:184](∅→∅),[2.184]→[2.184:190](∅→∅),[2.190]→[2.190:245](∅→∅),[2.245]→[2.245:283](∅→∅),[2.283]→[5.1141:1213](∅→∅),[5.1141]→[5.1141:1213](∅→∅),[5.1213]→[2.284:327](∅→∅)
let original_: HashSet<_> = original.iter().collect();let mut now_ = HashSet::with_capacity(original.len());let mut result = Vec::with_capacity(original.len());for &h in now {now_.insert(h);result.push(h);}let mut stack = now.to_vec();stack.reverse();while let Some(n) = stack.pop() {// check that all of `now`'s deps are in now or not in originalfor d in c.get_dependencies(&n)? {let mut now_ = HashSet::new();let mut result = Vec::new();for &h in now.iter() {for d in c.get_dependencies(&h)? { - replacement in "pijul/src/commands/pushpull.rs" at line 569
if original_.get(&d).is_some() && now_.get(&d).is_none() {if now_.insert(d) { - replacement in "pijul/src/commands/pushpull.rs" at line 571
now_.insert(d);stack.push(d);continue; - replacement in "pijul/src/commands/pushpull.rs" at line 574
if now_.insert(n) {result.push(n)if now_.insert(h) {result.push(h) - replacement in "libpijul/src/pristine/mod.rs" at line 264
if b.len() != bb.0.len() {if b.len() != data_encoding::BASE32_NOPAD.encode_len(16) {