76PCXGML77EZWTRI5E6KHLVRAFTJ2AB5YRN5EKOYNAPKTWY2KCGAC RemoteRepo::Ssh(ref s) => s.name.as_str(),RemoteRepo::Local(ref l) => l.name.as_str(),RemoteRepo::Http(ref h) => h.name.as_str(),
RemoteRepo::Ssh(ref s) => Some(s.name.as_str()),RemoteRepo::Local(ref l) => Some(l.name.as_str()),RemoteRepo::Http(ref h) => Some(h.name.as_str()),RemoteRepo::LocalChannel(_) => None,
}pub fn get_state<T: TxnTExt>(txn: &T,channel: &libpijul::pristine::ChannelRef<T>,mid: Option<u64>,) -> Option<(u64, Merkle)> {if let Some(mid) = mid {txn.get_changes(&channel, mid).map(|(_, m)| (mid, m))} else {txn.reverse_log(&channel.borrow(), None).next().map(|(n, (_, m))| (n, m))}
pub fn upload_changes<T: MutTxnTExt,C: libpijul::changestore::ChangeStore,W: libpijul::working_copy::WorkingCopy,>(store: &C,repo: &mut W,txn: &mut T,channel: &mut libpijul::pristine::ChannelRef<T>,changes: &[Hash],) -> Result<(), anyhow::Error> {let mut ws = libpijul::ApplyWorkspace::new();for c in changes {txn.apply_change_ws(store, channel, *c, &mut ws)?;}txn.output_repository_no_pending(repo, store, channel, "", true)?;Ok(())}
if txn.remote_has_state(&remote_changes, m) {break;}let h_int = txn.get_internal(h).unwrap();if !txn.remote_has_change(&remote_changes, h) {if let Some(ref p) = path {if txn.get_touched_files(*p, Some(h_int)).is_some() {
if let Some(ref remote_changes) = remote_changes {if txn.remote_has_state(remote_changes, m) {break;}let h_int = txn.get_internal(h).unwrap();if !txn.remote_has_change(&remote_changes, h) {if let Some(ref p) = path {if txn.get_touched_files(*p, Some(h_int)).is_some() {to_upload.push(h)}} else {
} else {to_upload.push(h)
}} else if let crate::remote::RemoteRepo::LocalChannel(ref remote_channel) = remote {if let Some(channel) = txn.load_channel(remote_channel) {let channel = channel.borrow();let h_int = txn.get_internal(h).unwrap();if txn.get_changeset(&channel.changes, h_int, None).is_none() {if let Some(ref p) = path {if txn.get_touched_files(*p, Some(h_int)).is_some() {to_upload.push(h)}} else {to_upload.push(h)}}
for (_, (h, m)) in txn.iter_remote(&remote_changes.borrow().remote, 0) {if txn.channel_has_state(&channel, m) {break;} else if txn.get_revchanges(&channel, h).is_none() {to_download.push(h)
if let Some(ref remote_changes) = remote_changes {for (_, (h, m)) in txn.iter_remote(&remote_changes.borrow().remote, 0) {if txn.channel_has_state(&channel, m) {break;} else if txn.get_revchanges(&channel, h).is_none() {to_download.push(h)}}} else if let crate::remote::RemoteRepo::LocalChannel(ref remote_channel) = remote {let path = if let Some(path) = paths.pop() {let (p, ambiguous) = txn.follow_oldest_path(&repo.changes, &channel, &path)?;if ambiguous {return Err((crate::Error::AmbiguousPath { path: path.clone() }).into());}Some(p)} else {None};if let Some(remote_channel) = txn.load_channel(remote_channel) {let remote_channel = remote_channel.borrow();for (_, (h, m)) in txn.reverse_log(&remote_channel, None) {if txn.channel_has_state(&channel, m) {break;}let h_int = txn.get_internal(h).unwrap();if txn.get_changeset(&channel.borrow().changes, h_int, None).is_none(){if let Some(ref p) = path {if txn.get_touched_files(*p, Some(h_int)).is_some() {to_download.push(h)}} else {to_download.push(h)}}}
let mut p = std::path::Path::new(&self.name).to_path_buf();if !self.name.ends_with(".tar.gz") {p.set_extension("tar.gz");
if let crate::remote::RemoteRepo::LocalChannel(_) = remote {if let Some(ref mut path) = self.repo_path {path.clear();path.push(rem);}} else {let mut p = std::path::Path::new(&self.name).to_path_buf();if !self.name.ends_with(".tar.gz") {p.set_extension("tar.gz");}let mut f = std::fs::File::create(&p)?;remote.archive(self.prefix, state.map(|x| (x, &extra[..])), &mut f).await?;return Ok(());
let mut f = std::fs::File::create(&p)?;remote.archive(self.prefix, state.map(|x| (x, &extra[..])), &mut f).await?;} else if let Ok(repo) = Repository::find_root(self.repo_path.clone()) {
}if let Ok(repo) = Repository::find_root(self.repo_path.clone()) {