When downloading changes, check whether we have their dependencies and download them too
Dependencies
- [2]
6NUSIEGDFixing concurrency issues in output, when large binary files are involved - [3]
4XLHUME7Fixing a interlocking when cloning from a particular patch - [4]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [5]
Q45QHPO4Feedback on network stuff - [6]
X6YFD4WVDo not download changes if we already have them - [7]
MU5GSJAWPartial push and pull (WARNING: breaks the existing protocol) - [8]
5SLOJYHGFixing the Git feature - [9]
TPEH2XNB1.0.0-alpha.28, with Tokio 1.0 - [10]
2RXOCWUWMaking libpijul deterministic (and getting rid of `rand`) - [11]
ZDK3GNDBTag transactions (including a massive refactoring of errors) - [12]
2D7P2VKJChange completions (where the whole progress bar story started) - [13]
ZWVYH7WPPulling local tags - [14]
QE64ATLZFixing asynchronicity problems in SSH - [15]
EUZFFJSOUpdating Pijul with the latest changes in Libpijul - [16]
I24UEJQLVarious post-fire fixes - [17]
DO2Y5TY5Tag synchronisation - [18]
5QTMRUXNFixing a race condition between progress bars - [19]
3KRGVQFUDo not update the mtime of unmodified files - [20]
3WO4H2MMFixing async issues in downloads - [21]
A3RM526YIntegrating identity malleability - [22]
TKEVOH7HFixing a bug when downloading changes, and making change download more efficient (more async) - [23]
LGEJSLTYFixing output (including its uses in reset and pull) - [24]
XA23FMQMReset only files that have been modified - [25]
BNPSVXICFriendlier progress bars - [26]
HXEIH4UQPulling more than 100 changes at once
Change contents
- replacement in pijul/src/remote/mod.rs at line 1147
let (mut send, mut recv) = tokio::sync::mpsc::channel(100);let (mut send, recv) = tokio::sync::mpsc::channel(100); - edit in pijul/src/remote/mod.rs at line 1163
let mut waiting = 0; - edit in pijul/src/remote/mod.rs at line 1175
waiting += 1; - replacement in pijul/src/remote/mod.rs at line 1180
std::mem::drop(hash_send);let (u, mut to_apply) = self.download_changes_rec(repo, hash_send, recv, pro_a, waiting).await?; - replacement in pijul/src/remote/mod.rs at line 1187
for h in to_apply {while let Some(h) = to_apply.recv().await { - edit in pijul/src/remote/mod.rs at line 1189[4.3215]→[4.3215:3307](∅→∅),[4.3307]→[3.257:315](∅→∅),[3.315]→[4.3360:3473](∅→∅),[4.3360]→[4.3360:3473](∅→∅),[4.920]→[4.70253:70312](∅→∅),[4.3473]→[4.70253:70312](∅→∅),[4.70253]→[4.70253:70312](∅→∅)
while to_download.contains(&h) {debug!("waiting for {:?}", h);if let Some((h, _)) = recv.recv().await {debug!("recv {:?}", h);to_download.remove(&h);} else {break;}} - replacement in pijul/src/remote/mod.rs at line 1193
if let CS::Change(h) = h {if let CS::Change(ref h) = h { - replacement in pijul/src/remote/mod.rs at line 1213
|| { inodes.iter().any(|i| CS::Change(i.change) == *h) };|| { inodes.iter().any(|i| CS::Change(i.change) == h) }; - replacement in pijul/src/remote/mod.rs at line 1216
to_apply_inodes.push(*h);to_apply_inodes.push(h); - replacement in pijul/src/remote/mod.rs at line 1227
txn.apply_change_ws(&repo.changes, &mut channel, h, &mut ws)?;txn.apply_change_rec_ws(&repo.changes, &mut channel, &h, &mut ws)?; - edit in pijul/src/remote/mod.rs at line 1236
std::mem::drop(recv); - edit in pijul/src/remote/mod.rs at line 1238
u.await??; - edit in pijul/src/remote/mod.rs at line 1243
async fn download_changes_rec(&mut self,repo: &mut Repository,send_hash: tokio::sync::mpsc::UnboundedSender<CS>,mut recv_signal: tokio::sync::mpsc::Receiver<(CS, bool)>,pro_n: usize,mut waiting: usize,) -> Result<(tokio::task::JoinHandle<Result<(), anyhow::Error>>,tokio::sync::mpsc::Receiver<CS>,),anyhow::Error,> {let (send_ready, recv_ready) = tokio::sync::mpsc::channel(100);let mut change_path = repo.changes_dir.clone();let mut dep_path = repo.changes_dir.clone();let changes = repo.changes.clone();let t = tokio::spawn(async move {let mut ready = Vec::new();while let Some((hash, follow)) = recv_signal.recv().await {if let CS::Change(hash) = hash {waiting -= 1;if follow {libpijul::changestore::filesystem::push_filename(&mut change_path, &hash);std::fs::create_dir_all(change_path.parent().unwrap())?;use libpijul::changestore::ChangeStore;let mut needs_dep = false;for dep in changes.get_dependencies(&hash)? {let dep: libpijul::pristine::Hash = dep;libpijul::changestore::filesystem::push_filename(&mut dep_path, &dep);let has_dep = std::fs::metadata(&dep_path).is_ok();libpijul::changestore::filesystem::pop_filename(&mut dep_path); - edit in pijul/src/remote/mod.rs at line 1279
if !has_dep {needs_dep = true;PROGRESS.borrow_mut().unwrap()[pro_n].incr_len();send_hash.send(CS::Change(dep))?;waiting += 1}}libpijul::changestore::filesystem::pop_filename(&mut change_path);if !needs_dep {send_ready.send(CS::Change(hash)).await?;} else {ready.push(CS::Change(hash))}} else {send_ready.send(CS::Change(hash)).await?;}}if waiting == 0 {break;}}for r in ready {send_ready.send(r).await?;}std::mem::drop(recv_signal);Ok(())});Ok((t, recv_ready))} - edit in pijul/src/remote/mod.rs at line 1317
let (mut send_signal, mut recv_signal) = tokio::sync::mpsc::channel(100); - replacement in pijul/src/remote/mod.rs at line 1318
let mut change_path_ = repo.changes_dir.clone();let (mut send_signal, recv_signal) = tokio::sync::mpsc::channel(100); - replacement in pijul/src/remote/mod.rs at line 1328
let mut change_path_ = repo.changes_dir.clone(); - edit in pijul/src/remote/mod.rs at line 1347
let (u, mut recv_ready) = self.download_changes_rec(repo, send_hash, recv_signal, pro_n, waiting).await?; - edit in pijul/src/remote/mod.rs at line 1351
let mut change_path = repo.changes_dir.clone(); - edit in pijul/src/remote/mod.rs at line 1352[4.72116]→[3.373:441](∅→∅),[3.441]→[4.17707:17752](∅→∅),[4.72174]→[4.17707:17752](∅→∅),[4.17752]→[3.442:1197](∅→∅),[3.1197]→[4.18201:18219](∅→∅),[4.18201]→[4.18201:18219](∅→∅),[4.18219]→[3.1198:1264](∅→∅),[3.1264]→[4.72577:72591](∅→∅),[4.4140]→[4.72577:72591](∅→∅),[4.18302]→[4.72577:72591](∅→∅),[4.72577]→[4.72577:72591](∅→∅),[4.72670]→[4.72670:72752](∅→∅)
while let Some((hash, follow)) = recv_signal.recv().await {if let CS::Change(hash) = hash {waiting -= 1;if follow {libpijul::changestore::filesystem::push_filename(&mut change_path, &hash);std::fs::create_dir_all(change_path.parent().unwrap())?;use libpijul::changestore::ChangeStore;hashes.push(CS::Change(hash));for dep in repo.changes.get_dependencies(&hash)? {let dep: libpijul::pristine::Hash = dep;PROGRESS.borrow_mut().unwrap()[pro_n].incr_len();send_hash.send(CS::Change(dep))?;waiting += 1}libpijul::changestore::filesystem::pop_filename(&mut change_path);}}if waiting == 0 {break}}std::mem::drop(recv_signal);std::mem::drop(send_hash); - replacement in pijul/src/remote/mod.rs at line 1355
for hash in hashes.iter().rev() {if let CS::Change(hash) = hash {while let Some(hash) = recv_ready.recv().await {if let CS::Change(ref hash) = hash { - edit in pijul/src/remote/mod.rs at line 1359
hashes.push(hash); - edit in pijul/src/remote/mod.rs at line 1364
u.await??; - replacement in pijul/src/commands/clone.rs at line 108[4.22604]→[4.22604:22660](∅→∅),[4.22660]→[4.17222:17254](∅→∅),[4.17254]→[4.185679:185706](∅→∅),[4.22699]→[4.185679:185706](∅→∅),[4.185679]→[4.185679:185706](∅→∅),[4.185706]→[4.17255:17295](∅→∅),[4.1926]→[4.185732:185766](∅→∅),[4.17295]→[4.185732:185766](∅→∅),[4.22746]→[4.185732:185766](∅→∅),[4.185732]→[4.185732:185766](∅→∅),[4.185766]→[4.491:509](∅→∅),[4.509]→[2.46:81](∅→∅),[2.81]→[4.1592:1628](∅→∅),[4.22776]→[4.1592:1628](∅→∅),[4.509]→[4.185766:185778](∅→∅),[4.1628]→[4.185766:185778](∅→∅),[4.22776]→[4.185766:185778](∅→∅),[4.185766]→[4.185766:185778](∅→∅)
libpijul::output::output_repository_no_pending(&repo.working_copy,&repo.changes,&txn,&channel,"",true,None,1, // num_cpus::get(),self.salt.unwrap_or(0),)?;if self.partial_paths.is_empty() {libpijul::output::output_repository_no_pending(&repo.working_copy,&repo.changes,&txn,&channel,"",true,None,1, // num_cpus::get(),self.salt.unwrap_or(0),)?;} else {for p in self.partial_paths.iter() {libpijul::output::output_repository_no_pending(&repo.working_copy,&repo.changes,&txn,&channel,p,true,None,1, // num_cpus::get(),self.salt.unwrap_or(0),)?;}}