Fixing missing dependencies on partial clones
Dependencies
- [2]
R7X3PDL6Formatting - [3]
ABQDWHNGMigrate from `pijul::repository` to `pijul-repository` - [4]
PYTC7DPVPartial clones: including all the subtree of a directory when selecting patches - [5]
IBPVOKM5Fixing a bug in patch download - [6]
I24UEJQLVarious post-fire fixes - [7]
L2VH4BYKDownloading changelists from channels without an id (Nest discussions) - [8]
XQHABMC2Do not block when there is no patch to pull - [9]
EUZFFJSOUpdating Pijul with the latest changes in Libpijul - [10]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [11]
YN63NUZOSanakirja 1.0 - [12]
RUBBHYZ7Removing unnecessary async/await - [13]
MU5GSJAWPartial push and pull (WARNING: breaks the existing protocol) - [14]
A3RM526YIntegrating identity malleability - [15]
RM225IDQExchanging tagged states over SSH - [16]
4XLHUME7Fixing a interlocking when cloning from a particular patch - [17]
ZBNKSYA6Fixing a bus error when starting a transaction on a full disk - [18]
DDJO7X2PRemove dependency on `num_cpus` - [19]
C3L2TLQWWhen downloading changes, check whether we have their dependencies and download them too - [20]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [21]
WZVCLZKYaddress clippy lints - [22]
DO2Y5TY5Tag synchronisation - [23]
JL4WKA5PImplement the Sanakirja concurrency model in a cross-process way - [24]
4HTHYIA3Fixing HTTP download - [25]
S2B5MEWPMinor change in the type of sanakirja::GraphTxnT::Graph (prepare for more general backends) - [26]
UDHP4ZVBFixing SSH asynchronicity issues - [27]
I52XSRUHMassive cleanup, and simplification - [28]
ZWVYH7WPPulling local tags - [29]
TYAKEAJLA better estimate of the maximum number of open patches we can keep (Unix-only at the moment) - [*]
L4JXJHWXpijul/*: reorganize imports and remove extern crate
Change contents
- replacement in pijul-remote/src/local.rs at line 71
mut f: F,f: F, - edit in pijul-remote/src/local.rs at line 76[5.4367]→[5.1024:1126](∅→∅),[5.1126]→[3.722:766](∅→∅),[5.417]→[5.1170:1181](∅→∅),[3.766]→[5.1170:1181](∅→∅),[5.1170]→[5.1170:1181](∅→∅)
let store = libpijul::changestore::filesystem::FileSystem::from_root(&self.root,pijul_repository::max_files()?,); - edit in pijul-remote/src/local.rs at line 86
self.download_changelist_(f, a, from, paths, &remote_txn, &remote_channel)}pub fn download_changelist_<A,T: libpijul::ChannelTxnT + libpijul::TxnTExt + libpijul::DepsTxnT + libpijul::GraphTxnT,F: FnMut(&mut A, u64, Hash, Merkle, bool) -> Result<(), anyhow::Error>,>(&mut self,mut f: F,a: &mut A,from: u64,paths: &[String],remote_txn: &T,remote_channel: &ChannelRef<T>,) -> Result<HashSet<Position<Hash>>, anyhow::Error> {let store = libpijul::changestore::filesystem::FileSystem::from_root(&self.root,pijul_repository::max_files()?,); - replacement in pijul-remote/src/local.rs at line 113
libpijul::fs::iter_graph_descendants(&remote_txn, &remote_channel.read(), p)?.map(|x| x.unwrap()),libpijul::fs::iter_graph_descendants(remote_txn,remote_txn.graph(&*remote_channel.read()),p,)?.map(|x| x.unwrap()), - replacement in pijul-remote/src/local.rs at line 138[5.21242]→[5.21242:21290](∅→∅),[5.1033]→[5.10768:10802](∅→∅),[5.1179]→[5.10768:10802](∅→∅),[5.21290]→[5.10768:10802](∅→∅),[5.10768]→[5.10768:10802](∅→∅),[5.10802]→[5.8963:9223](∅→∅)
for x in remote_txn.log(&*rem, from)? {let (n, (h, m)) = x?;assert!(n >= from);let h_int = remote_txn.get_internal(h)?.unwrap();if paths_.is_empty()|| paths_.iter().any(|x| {remote_txn.get_touched_files(x, Some(h_int))if paths_.is_empty() {for x in remote_txn.log(&*rem, from)? {debug!("log {:?}", x);let (n, (h, m)) = x?;assert!(n >= from);debug!("put_remote {:?} {:?} {:?}", n, h, m);if tags.get(tagsi) == Some(&n) {f(a, n, h.into(), m.into(), true)?;tagsi += 1;} else {f(a, n, h.into(), m.into(), false)?;}}} else {let mut hashes = HashMap::new();let mut stack = Vec::new();for x in remote_txn.log(&*rem, from)? {debug!("log {:?}", x);let (n, (h, m)) = x?;assert!(n >= from);let h_int = remote_txn.get_internal(h)?.unwrap();if paths_.is_empty()|| paths_.iter().any(|x| {let y = remote_txn.get_touched_files(x, Some(h_int)).unwrap();debug!("x {:?} {:?}", x, y);y == Some(h_int)}){stack.push((*h_int, *m, n));}}while let Some((h_int, m, n)) = stack.pop() {if hashes.insert(h_int, (m, n)).is_some() {continue;}for d in remote_txn.iter_dep(&h_int)? {let (&h_int_, &d) = d?;if h_int_ < h_int {continue;} else if h_int_ > h_int {break;}let n = remote_txn.get_changeset(remote_txn.changes(&*rem), &d) - replacement in pijul-remote/src/local.rs at line 184
.is_some()}){.unwrap();let m = remote_txn.get_revchangeset(remote_txn.rev_changes(&*rem), &n).unwrap().unwrap().b;stack.push((d, m.into(), (*n).into()))}}let mut hashes: Vec<_> = hashes.into_iter().collect();hashes.sort_by_key(|(_, (_, n))| *n);for (h_int, (m, n)) in hashes {let h = remote_txn.get_external(&h_int)?.unwrap(); - edit in pijul-remote/src/local.rs at line 287
libpijul::changestore::filesystem::pop_filename(&mut self.changes_dir); - replacement in pijul-remote/src/local.rs at line 289
send.send((c, false)).await?;send.send((c, true)).await?; - edit in pijul-remote/src/lib.rs at line 1348
let mut change_path = repo.changes_dir.clone(); - edit in pijul-remote/src/lib.rs at line 1359
libpijul::changestore::filesystem::push_filename(&mut change_path, &hash);std::fs::create_dir_all(change_path.parent().unwrap())?; - edit in pijul-remote/src/lib.rs at line 1377
libpijul::changestore::filesystem::pop_filename(&mut change_path); - edit in pijul/src/commands/protocol.rs at line 5[31.1913][31.1913]
use std::sync::Arc; - replacement in pijul/src/commands/protocol.rs at line 56
let txn = repo.pristine.arc_txn_begin()?;let pristine = Arc::new(repo.pristine);let txn = pristine.arc_txn_begin()?; - replacement in pijul/src/commands/protocol.rs at line 129
let mut paths = HashSet::new();debug!("cap[3] = {:?}", &cap[3]);let mut paths = Vec::new(); - replacement in pijul/src/commands/protocol.rs at line 131[5.11419]→[5.126749:126816](∅→∅),[5.11873]→[5.126749:126816](∅→∅),[5.126749]→[5.126749:126816](∅→∅),[5.126816]→[5.11420:11484](∅→∅),[5.11484]→[5.126875:127036](∅→∅),[5.126875]→[5.126875:127036](∅→∅),[5.127036]→[5.15583:15635](∅→∅)
for r in CHANGELIST_PATHS.captures_iter(&cap[3]) {let s: String = r[1].replace("\\\"", "\"");if let Ok((p, ambiguous)) = txn.follow_oldest_path(&repo.changes, &channel, &s){if ambiguous {bail!("Ambiguous path"){for r in CHANGELIST_PATHS.captures_iter(&cap[3]) {let s: String = r[1].replace("\\\"", "\"");if let Ok((p, ambiguous)) =txn.follow_oldest_path(&repo.changes, &channel, &s){if ambiguous {bail!("Ambiguous path")}let h: libpijul::Hash = txn.get_external(&p.change)?.unwrap().into();writeln!(o, "{}.{}", h.to_base32(), p.pos.0)?;paths.push(s);} else {debug!("protocol line: {:?}", buf);bail!("Protocol error") - edit in pijul/src/commands/protocol.rs at line 147[5.127257]→[5.12298:12392](∅→∅),[5.12392]→[5.11554:11666](∅→∅),[5.15706]→[5.11554:11666](∅→∅),[5.11554]→[5.11554:11666](∅→∅),[5.11666]→[5.15707:15745](∅→∅),[5.15745]→[5.242:335](∅→∅),[5.335]→[5.15845:15926](∅→∅),[5.11973]→[5.15845:15926](∅→∅),[5.17936]→[5.15845:15926](∅→∅),[5.15845]→[5.15845:15926](∅→∅),[5.11881]→[5.127295:127324](∅→∅),[5.15926]→[5.127295:127324](∅→∅),[5.127295]→[5.127295:127324](∅→∅),[5.127324]→[5.15927:16035](∅→∅)
let h: libpijul::Hash = txn.get_external(&p.change)?.unwrap().into();writeln!(o, "{}.{}", h.to_base32(), p.pos.0)?;paths.insert(p);paths.extend(libpijul::fs::iter_graph_descendants(&*txn, &channel.read(), p)?.map(|x| x.unwrap()),);} else {debug!("protocol line: {:?}", buf);bail!("Protocol error") - edit in pijul/src/commands/protocol.rs at line 149
debug!("paths = {:?}", paths);let tags: Vec<u64> = txn.iter_tags(txn.tags(&*channel.read()), from)?.map(|k| (*k.unwrap().0).into()).collect(); - replacement in pijul/src/commands/protocol.rs at line 150[5.33990]→[5.11974:12034](∅→∅),[5.11929]→[5.11974:12034](∅→∅),[5.12034]→[5.16097:16202](∅→∅),[5.17998]→[5.16097:16202](∅→∅),[5.16097]→[5.16097:16202](∅→∅),[5.16202]→[5.127675:127715](∅→∅),[5.127675]→[5.127675:127715](∅→∅),[5.127715]→[5.11930:11980](∅→∅),[5.11980]→[5.12393:12532](∅→∅),[5.12532]→[5.12078:12105](∅→∅),[5.16342]→[5.12078:12105](∅→∅),[5.12078]→[5.12078:12105](∅→∅),[5.12105]→[5.127871:127893](∅→∅),[5.127871]→[5.127871:127893](∅→∅),[5.127893]→[5.12533:12631](∅→∅),[5.12631]→[5.33991:34068](∅→∅)
for x in txn.log(&*channel.read(), from)? {let (n, (h, m)) = x?;let h_int = txn.get_internal(h)?.unwrap();if paths.is_empty()|| paths.iter().any(|x| {x.change == *h_int|| txn.get_touched_files(x, Some(h_int)).unwrap().is_some()}){let h: Hash = h.into();let m: Merkle = m.into();if paths.is_empty() && tags.get(tagsi) == Some(&n) {(pijul_remote::local::Local {channel: (&cap[1]).to_string(),root: PathBuf::new(),changes_dir: PathBuf::new(),pristine: pristine.clone(),name: String::new(),}).download_changelist_(|_, n, h, m, is_tag| {if is_tag { - replacement in pijul/src/commands/protocol.rs at line 165
}}Ok(())},&mut (),from,&paths,&*txn,&channel,)?;