edit in pijul-macros/src/lib.rs at line 57
+ };
+ let txnerr = next(&mut input_iter);
+ let txnerr = if txnerr.is_empty() {
+ quote! { TxnErr }
+ } else {
+ proc_macro2::TokenStream::from_iter(txnerr.into_iter())
replacement in pijul-macros/src/lib.rs at line 65
[12.2682]→[12.563:696](∅→∅) − fn #name_get <'txn> (&'txn self, key: &#key, value: Option<&#value>) -> Result<Option<&'txn #value>, TxnErr<Self::#error>> {
+ fn #name_get <'txn> (&'txn self, key: &#key, value: Option<&#value>) -> Result<Option<&'txn #value>, #txnerr<Self::#error>> {
replacement in pijul-macros/src/lib.rs at line 71
[12.939]→[12.939:1004](∅→∅) − Err(TxnErr(SanakirjaError::PristineCorrupt))
+ Err(#txnerr(SanakirjaError::PristineCorrupt))
edit in pijul-macros/src/lib.rs at line 96
+ let txnerr = next(&mut input_iter);
+ let txnerr = if txnerr.is_empty() {
+ quote! { TxnErr }
+ } else {
+ proc_macro2::TokenStream::from_iter(txnerr.into_iter())
+ };
replacement in pijul-macros/src/lib.rs at line 104
[12.3671]→[12.1037:1194](∅→∅) − fn #name_get<'txn>(&'txn self, db: &Self::#name_capital, key: &#key, value: Option<&#value>) -> Result<Option<&'txn #value>, TxnErr<Self::#error>> {
+ fn #name_get<'txn>(&'txn self, db: &Self::#name_capital, key: &#key, value: Option<&#value>) -> Result<Option<&'txn #value>, #txnerr<Self::#error>> {
replacement in pijul-macros/src/lib.rs at line 110
[12.1428]→[12.1428:1493](∅→∅) − Err(TxnErr(SanakirjaError::PristineCorrupt))
+ Err(#txnerr(SanakirjaError::PristineCorrupt))
edit in pijul-macros/src/lib.rs at line 133
+ };
+ let txnerr = next(&mut input_iter);
+ let txnerr = if txnerr.is_empty() {
+ quote! { TxnErr }
+ } else {
+ proc_macro2::TokenStream::from_iter(txnerr.into_iter())
replacement in pijul-macros/src/lib.rs at line 142
[12.4594]→[12.1512:1642](∅→∅) − fn #name_get<'txn>(&'txn self, key: &#key, value: Option<&#value>) -> Result<Option<&'txn #value>, TxnErr<Self::#error>>;
+ fn #name_get<'txn>(&'txn self, key: &#key, value: Option<&#value>) -> Result<Option<&'txn #value>, #txnerr<Self::#error>>;
edit in pijul-macros/src/lib.rs at line 164
+ let txnerr = next(&mut input_iter);
+ let txnerr = if txnerr.is_empty() {
+ quote! { TxnErr }
+ } else {
+ proc_macro2::TokenStream::from_iter(txnerr.into_iter())
+ };
replacement in pijul-macros/src/lib.rs at line 172
[12.5483]→[12.1643:1799](∅→∅) − fn #name_get<'txn>(&'txn self, db: &Self::#name_capital, key: &#key, value: Option<&#value>) -> Result<Option<&'txn #value>, TxnErr<Self::#error>>;
+ fn #name_get<'txn>(&'txn self, db: &Self::#name_capital, key: &#key, value: Option<&#value>) -> Result<Option<&'txn #value>, #txnerr<Self::#error>>;
edit in pijul-macros/src/lib.rs at line 259
+ let txnerr = next(&mut input_iter);
+ let txnerr = if txnerr.is_empty() {
+ quote! { TxnErr }
+ } else {
+ proc_macro2::TokenStream::from_iter(txnerr.into_iter())
+ };
replacement in pijul-macros/src/lib.rs at line 268
[12.8069]→[12.2021:2142](∅→∅) − Result<crate::pristine::RevCursor<Self, &'txn Self, Self::#cursor_name, #key, #value>, TxnErr<Self::#error>>
+ Result<crate::pristine::RevCursor<Self, &'txn Self, Self::#cursor_name, #key, #value>, #txnerr<Self::#error>>
replacement in pijul-macros/src/lib.rs at line 272
[12.8200]→[12.2143:2261](∅→∅) − Result<crate::pristine::Cursor<Self, &'txn Self, Self::#cursor_name, #key, #value>, TxnErr<Self::#error>>
+ Result<crate::pristine::Cursor<Self, &'txn Self, Self::#cursor_name, #key, #value>, #txnerr<Self::#error>>
replacement in pijul-macros/src/lib.rs at line 283
[12.8573]→[12.2378:2461](∅→∅) − ) -> Result<Option<(&'txn #key, &'txn #value)>, TxnErr<Self::#error>>;
+ ) -> Result<Option<(&'txn #key, &'txn #value)>, #txnerr<Self::#error>>;
replacement in pijul-macros/src/lib.rs at line 287
[12.8753]→[12.2462:2545](∅→∅) − ) -> Result<Option<(&'txn #key, &'txn #value)>, TxnErr<Self::#error>>;
+ ) -> Result<Option<(&'txn #key, &'txn #value)>, #txnerr<Self::#error>>;
replacement in pijul-macros/src/lib.rs at line 296
[12.2597]→[12.2406:2518](∅→∅),
[12.9053]→[12.2406:2518](∅→∅) − ) -> Result<crate::pristine::Cursor<Self, RT, Self::#cursor_name, #key, #value>, TxnErr<Self::#error>>;
+ ) -> Result<crate::pristine::Cursor<Self, RT, Self::#cursor_name, #key, #value>, #txnerr<Self::#error>>;
edit in pijul-macros/src/lib.rs at line 381
+
+ let txnerr = next(&mut input_iter);
+ let txnerr = if txnerr.is_empty() {
+ quote! { TxnErr }
+ } else {
+ proc_macro2::TokenStream::from_iter(txnerr.into_iter())
+ };
replacement in pijul-macros/src/lib.rs at line 395
[12.2773]→[12.0:110](∅→∅),
[12.12375]→[12.0:110](∅→∅) − ) -> Result<Cursor<Self, &'txn Self, Self::#cursor_name, #key, #value>, TxnErr<SanakirjaError>> {
+ ) -> Result<Cursor<Self, &'txn Self, Self::#cursor_name, #key, #value>, #txnerr<SanakirjaError>> {
replacement in pijul-macros/src/lib.rs at line 409
[12.2829]→[12.111:213](∅→∅),
[12.12848]→[12.111:213](∅→∅) − ) -> Result<Cursor<Self, RT, Self::#cursor_name, #key, #value>, TxnErr<SanakirjaError>> {
+ ) -> Result<Cursor<Self, RT, Self::#cursor_name, #key, #value>, #txnerr<SanakirjaError>> {
replacement in pijul-macros/src/lib.rs at line 433
[12.3317]→[12.3092:3212](∅→∅),
[12.13495]→[12.3092:3212](∅→∅) − ) -> Result<super::RevCursor<Self, &'txn Self, Self::#cursor_name, #key, #value>, TxnErr<SanakirjaError>> {
+ ) -> Result<super::RevCursor<Self, &'txn Self, Self::#cursor_name, #key, #value>, #txnerr<SanakirjaError>> {
replacement in pijul-macros/src/lib.rs at line 455
[12.3775]→[12.247:357](∅→∅),
[12.14294]→[12.247:357](∅→∅) − ) -> Result<Cursor<Self, &'txn Self, Self::#cursor_name, #key, #value>, TxnErr<SanakirjaError>> {
+ ) -> Result<Cursor<Self, &'txn Self, Self::#cursor_name, #key, #value>, #txnerr<SanakirjaError>> {
replacement in pijul-macros/src/lib.rs at line 472
[12.14808]→[12.4128:4214](∅→∅) − ) -> Result<Option<(&'txn #key, &'txn #value)>, TxnErr<SanakirjaError>> {
+ ) -> Result<Option<(&'txn #key, &'txn #value)>, #txnerr<SanakirjaError>> {
replacement in pijul-macros/src/lib.rs at line 476
[12.4273]→[12.4273:4345](∅→∅) − return Err(TxnErr(SanakirjaError::PristineCorrupt))
+ return Err(#txnerr(SanakirjaError::PristineCorrupt))
replacement in pijul-macros/src/lib.rs at line 483
[12.15095]→[12.4302:4388](∅→∅) − ) -> Result<Option<(&'txn #key, &'txn #value)>, TxnErr<SanakirjaError>> {
+ ) -> Result<Option<(&'txn #key, &'txn #value)>, #txnerr<SanakirjaError>> {
replacement in pijul-macros/src/lib.rs at line 487
[12.4603]→[12.4603:4675](∅→∅) − return Err(TxnErr(SanakirjaError::PristineCorrupt))
+ return Err(#txnerr(SanakirjaError::PristineCorrupt))
edit in pijul-macros/src/lib.rs at line 534
+ };
+
+ let txnerr = next(&mut input_iter);
+ let txnerr = if txnerr.is_empty() {
+ quote! { TxnErr }
+ } else {
+ proc_macro2::TokenStream::from_iter(txnerr.into_iter())
replacement in pijul-macros/src/lib.rs at line 548
[12.16641]→[12.4589:4668](∅→∅) − type Item = Result<(&'a #key, &'a #value), TxnErr<T::#error>>;
+ type Item = Result<(&'a #key, &'a #value), #txnerr<T::#error>>;
replacement in pijul-macros/src/lib.rs at line 563
[12.17061]→[12.4782:4884](∅→∅) − pub fn prev(&mut self) -> Option<Result<(&'a #key, &'a #value), TxnErr<T::#error>>> {
+ pub fn prev(&mut self) -> Option<Result<(&'a #key, &'a #value), #txnerr<T::#error>>> {
replacement in pijul-macros/src/lib.rs at line 573
[12.17366]→[12.4995:5074](∅→∅) − type Item = Result<(&'a #key, &'a #value), TxnErr<T::#error>>;
+ type Item = Result<(&'a #key, &'a #value), #txnerr<T::#error>>;
edit in pijul-macros/src/lib.rs at line 605
+ };
+
+ let txnerr = next(&mut input_iter);
+ let txnerr = if txnerr.is_empty() {
+ quote! { TxnErr }
+ } else {
+ proc_macro2::TokenStream::from_iter(txnerr.into_iter())
replacement in pijul-macros/src/lib.rs at line 619
[12.5121]→[12.6782:6831](∅→∅),
[12.18449]→[12.6782:6831](∅→∅) − ) -> Result<bool, TxnErr<Self::#error>>;
+ ) -> Result<bool, #txnerr<Self::#error>>;
replacement in pijul-macros/src/lib.rs at line 624
[12.5176]→[12.6832:6881](∅→∅),
[12.18606]→[12.6832:6881](∅→∅) − ) -> Result<bool, TxnErr<Self::#error>>;
+ ) -> Result<bool, #txnerr<Self::#error>>;
edit in pijul-macros/src/lib.rs at line 648
+ };
+
+ let txnerr = next(&mut input_iter);
+ let txnerr = if txnerr.is_empty() {
+ quote! { TxnErr }
+ } else {
+ proc_macro2::TokenStream::from_iter(txnerr.into_iter())
replacement in pijul-macros/src/lib.rs at line 662
[12.5306]→[12.5306:5451](∅→∅) − ) -> Result<bool, TxnErr<Self::#error>> {
− Ok(::sanakirja::btree::put(&mut self.txn, &mut self.#name, k, v).map_err(TxnErr)?)
+ ) -> Result<bool, #txnerr<Self::#error>> {
+ Ok(::sanakirja::btree::put(&mut self.txn, &mut self.#name, k, v).map_err(#txnerr)?)
replacement in pijul-macros/src/lib.rs at line 669
[12.5555]→[12.5555:5700](∅→∅) − ) -> Result<bool, TxnErr<Self::#error>> {
− Ok(::sanakirja::btree::del(&mut self.txn, &mut self.#name, k, v).map_err(TxnErr)?)
+ ) -> Result<bool, #txnerr<Self::#error>> {
+ Ok(::sanakirja::btree::del(&mut self.txn, &mut self.#name, k, v).map_err(#txnerr)?)
replacement in pijul/src/remote/mod.rs at line 433
[12.56691]→[12.603:664](∅→∅) − pub async fn update_changelist<T: MutTxnTExt + TxnTExt>(
+ pub async fn update_changelist<T: MutTxnTExt + TxnTExt + 'static>(
replacement in pijul/src/remote/mod.rs at line 771
[4.1242]→[12.6651:6694](∅→∅),
[12.6651]→[12.6651:6694](∅→∅) − async fn get_id<T: libpijul::TxnTExt>(
+ async fn get_id<T: libpijul::TxnTExt + 'static>(
replacement in pijul/src/remote/mod.rs at line 781
[12.7116]→[4.1379:1435](∅→∅) − Ok(Some(*txn.id(&*channel.read())))
+ Ok(txn.id(&*channel.read()).cloned())
replacement in pijul/src/remote/mod.rs at line 854
[12.65147]→[12.10495:10543](∅→∅) − pub async fn upload_changes<T: MutTxnTExt>(
+ pub async fn upload_changes<T: MutTxnTExt + 'static>(
replacement in pijul/src/remote/mod.rs at line 935
[12.68736]→[12.650:710](∅→∅) − pub async fn pull<T: MutTxnTExt + TxnTExt + GraphIter>(
+ pub async fn pull<T: MutTxnTExt + TxnTExt + GraphIter + 'static>(
replacement in pijul/src/remote/mod.rs at line 1049
[12.70881]→[12.1406:1471](∅→∅) − pub async fn clone_tag<T: MutTxnTExt + TxnTExt + GraphIter>(
+ pub async fn clone_tag<T: MutTxnTExt + TxnTExt + GraphIter + 'static>(
replacement in pijul/src/remote/mod.rs at line 1116
[12.73029]→[12.1961:2028](∅→∅) − pub async fn clone_state<T: MutTxnTExt + TxnTExt + GraphIter>(
+ pub async fn clone_state<T: MutTxnTExt + TxnTExt + GraphIter + 'static>(
replacement in pijul/src/remote/mod.rs at line 1232
[12.77726]→[12.2672:2741](∅→∅) − pub async fn clone_channel<T: MutTxnTExt + TxnTExt + GraphIter>(
+ pub async fn clone_channel<T: MutTxnTExt + TxnTExt + GraphIter + 'static>(
replacement in pijul/src/remote/local.rs at line 44
[12.8812]→[12.648:690](∅→∅) − Ok(*txn.id(&*channel.read()))
+ Ok(*txn.id(&*channel.read()).unwrap())
replacement in pijul/src/remote/local.rs at line 224
[12.3753]→[12.970:1047](∅→∅) − pub fn upload_changes<T: MutTxnTExt, C: libpijul::changestore::ChangeStore>(
+ pub fn upload_changes<T: MutTxnTExt + 'static, C: libpijul::changestore::ChangeStore>(
replacement in pijul/src/commands/tag.rs at line 20
[12.700]→[12.700:722](∅→∅) + /// Create a tag, which are compressed channels. Note that tags
+ /// are not independent from the changes they contain.
edit in pijul/src/commands/tag.rs at line 53
+ },
+ /// Restore a tag into a new channel.
+ #[clap(name = "reset")]
+ Reset {
+ /// Set the repository where this command should run. Defaults to
+ /// the first ancestor of the current directory that contains a
+ /// `.pijul` directory.
+ #[clap(long = "repository")]
+ repo_path: Option<PathBuf>,
+ tag: String,
edit in pijul/src/commands/tag.rs at line 152
+ }
+ Some(SubCommand::Reset { repo_path, tag }) => {
+ let repo = Repository::find_root(repo_path)?;
+ let mut tag_path = repo.path.join(libpijul::DOT_DIR);
+ tag_path.push("tags");
+ let h = if let Some(h) = libpijul::Hash::from_base32(tag.as_bytes()) {
+ libpijul::changestore::filesystem::push_filename(&mut tag_path, &h);
+ h
+ } else {
+ super::find_hash(&mut tag_path, &tag)?
+ };
+
+ let tag = libpijul::tag::txn::TagTxn::new(&tag_path).unwrap();
+ let txn = libpijul::tag::txn::WithTag {
+ tag,
+ txn: repo.pristine.mut_txn_begin()?,
+ };
+ let channel = txn.channel();
+ let txn = ArcTxn::new(txn);
+
+ libpijul::output::output_repository_no_pending_(
+ &repo.working_copy,
+ &repo.changes,
+ &txn,
+ &channel,
+ "",
+ true,
+ None,
+ num_cpus::get(),
+ 0,
+ )?;
+ if let Ok(txn) = std::sync::Arc::try_unwrap(txn.0) {
+ txn.into_inner().txn.commit()?
+ }
+ writeln!(stdout, "Reset to tag {}", h.to_base32())?;
replacement in pijul/src/commands/log.rs at line 11
[12.134460]→[12.0:93](∅→∅) − use libpijul::pristine::{sanakirja::Txn, ChannelRef, DepsTxnT, GraphTxnT, TreeTxnT, TxnErr};
+ use libpijul::pristine::{
+ sanakirja::Txn, ChannelRef, DepsTxnT, GraphTxnT, TreeErr, TreeTxnT, TxnErr,
+ };
replacement in pijul/src/commands/log.rs at line 106
[12.2079]→[12.2079:2161](∅→∅) − Fs(#[from] libpijul::FsError<libpijul::pristine::sanakirja::SanakirjaError>),
+ TreeErr(#[from] TreeErr<libpijul::pristine::sanakirja::SanakirjaError>),
+ #[error(transparent)]
+ Fs(#[from] libpijul::FsError<libpijul::pristine::sanakirja::Txn>),
replacement in pijul/src/commands/git.rs at line 733
[12.160679]→[12.888:1006](∅→∅) − ) -> Result<
− (usize, Option<libpijul::Hash>, libpijul::Merkle),
− libpijul::LocalApplyError<T::GraphError>,
− > {
+ ) -> Result<(usize, Option<libpijul::Hash>, libpijul::Merkle), libpijul::LocalApplyError<T>> {
replacement in pijul/Cargo.toml at line 53
[12.197401]→[12.1709:1731](∅→∅) + clap = { version = "3.0.0-rc.0", features = [ "derive", "cargo" ] }
replacement in libpijul/src/working_copy/filesystem.rs at line 2
[12.208970]→[12.653:699](∅→∅) − use crate::pristine::{ArcTxn, InodeMetadata};
+ use crate::pristine::{ArcTxn, GraphTxnT, InodeMetadata, TreeErr, TreeTxnT, TxnErr};
replacement in libpijul/src/working_copy/filesystem.rs at line 87
[12.3253]→[12.3253:3277](∅→∅),
[12.3277]→[12.3277:3329](∅→∅) − #[derive(Debug, Error)]
− pub enum AddError<T: std::error::Error + 'static> {
+ #[derive(Error)]
+ pub enum AddError<T: GraphTxnT + TreeTxnT> {
replacement in libpijul/src/working_copy/filesystem.rs at line 97
[12.209918]→[12.3514:3538](∅→∅),
[12.3538]→[12.3538:3619](∅→∅) − #[derive(Debug, Error)]
− pub enum Error<C: std::error::Error + 'static, T: std::error::Error + 'static> {
+ impl<T: GraphTxnT + TreeTxnT> std::fmt::Debug for AddError<T> {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ AddError::Ignore(e) => std::fmt::Debug::fmt(e, fmt),
+ AddError::Io(e) => std::fmt::Debug::fmt(e, fmt),
+ AddError::Fs(e) => std::fmt::Debug::fmt(e, fmt),
+ }
+ }
+ }
+
+ #[derive(Error)]
+ pub enum Error<C: std::error::Error + 'static, T: GraphTxnT + TreeTxnT> {
replacement in libpijul/src/working_copy/filesystem.rs at line 114
[12.3046]→[12.3046:3066](∅→∅) + Txn(#[from] TxnErr<T::GraphError>),
+ #[error(transparent)]
+ Tree(#[from] TreeErr<T::TreeError>),
+ }
+
+ impl<C: std::error::Error + 'static, T: GraphTxnT + TreeTxnT> std::fmt::Debug for Error<C, T> {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ Error::Add(e) => std::fmt::Debug::fmt(e, fmt),
+ Error::Record(e) => std::fmt::Debug::fmt(e, fmt),
+ Error::Txn(e) => std::fmt::Debug::fmt(e, fmt),
+ Error::Tree(e) => std::fmt::Debug::fmt(e, fmt),
+ }
+ }
replacement in libpijul/src/working_copy/filesystem.rs at line 170
[12.1775]→[12.27831:27883](∅→∅),
[12.398]→[12.27831:27883](∅→∅) − ) -> Result<(), Error<C::Error, T::GraphError>>
+ ) -> Result<(), Error<C::Error, T>>
replacement in libpijul/src/working_copy/filesystem.rs at line 208
[12.1841]→[12.19632:19679](∅→∅),
[12.875]→[12.19632:19679](∅→∅) − ) -> Result<(), AddError<T::GraphError>> {
+ ) -> Result<(), AddError<T>> {
replacement in libpijul/src/working_copy/filesystem.rs at line 315
[12.1968]→[12.28356:28408](∅→∅),
[12.3130]→[12.28356:28408](∅→∅) − ) -> Result<(), Error<C::Error, T::GraphError>>
+ ) -> Result<(), Error<C::Error, T>>
replacement in libpijul/src/working_copy/filesystem.rs at line 324
[12.1238]→[12.1238:1294](∅→∅) − if !txn.read().is_tracked(&path_str)? {
+ if !crate::fs::is_tracked(&*txn.read(), &path_str)? {
replacement in libpijul/src/unrecord/working_copy.rs at line 6
[12.1]→[12.19820:19847](∅→∅),
[12.19847]→[12.19847:19924](∅→∅),
[12.19924]→[12.19924:19927](∅→∅) − pub fn undo_file_addition<
− T: GraphMutTxnT + TreeMutTxnT<TreeError = <T as GraphTxnT>::GraphError>,
− >(
+ pub fn undo_file_addition<T: TreeMutTxnT>(
replacement in libpijul/src/unrecord/working_copy.rs at line 10
[12.226275]→[12.19928:19969](∅→∅) − ) -> Result<(), TxnErr<T::GraphError>> {
+ ) -> Result<(), TreeErr<T::TreeError>> {
replacement in libpijul/src/unrecord/working_copy.rs at line 23
[12.3]→[12.20032:20059](∅→∅),
[12.20059]→[12.20059:20146](∅→∅),
[12.20146]→[12.20146:20169](∅→∅) − pub fn undo_file_deletion<
− T: ChannelTxnT + TreeMutTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,
− P: ChangeStore,
− >(
+ pub fn undo_file_deletion<T: ChannelTxnT + TreeMutTxnT + TreeTxnT, P: ChangeStore>(
replacement in libpijul/src/unrecord/working_copy.rs at line 30
[12.2060]→[12.20170:20234](∅→∅),
[12.226907]→[12.20170:20234](∅→∅) − ) -> Result<(), super::UnrecordError<P::Error, T::TreeError>> {
+ ) -> Result<(), super::UnrecordError<P::Error, T>> {
replacement in libpijul/src/unrecord/working_copy.rs at line 43
[12.5]→[12.20335:20347](∅→∅),
[12.20347]→[12.20347:20434](∅→∅),
[12.20434]→[12.20434:20457](∅→∅) − fn restore<
− T: ChannelTxnT + TreeMutTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,
− P: ChangeStore,
− >(
+ fn restore<T: ChannelTxnT + TreeMutTxnT + TreeTxnT, P: ChangeStore>(
replacement in libpijul/src/unrecord/working_copy.rs at line 50
[12.2141]→[12.20458:20522](∅→∅),
[12.227588]→[12.20458:20522](∅→∅) − ) -> Result<(), super::UnrecordError<P::Error, T::TreeError>> {
+ ) -> Result<(), super::UnrecordError<P::Error, T>> {
replacement in libpijul/src/unrecord/working_copy.rs at line 96
[12.9]→[12.20957:20975](∅→∅),
[12.20975]→[12.20975:21060](∅→∅),
[12.21060]→[12.21060:21083](∅→∅) − fn restore_inode<
− T: TreeMutTxnT + GraphTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,
− P: ChangeStore,
− >(
+ fn restore_inode<T: TreeMutTxnT + GraphTxnT + TreeTxnT, P: ChangeStore>(
replacement in libpijul/src/unrecord/working_copy.rs at line 103
[12.2429]→[12.424:499](∅→∅),
[12.229088]→[12.424:499](∅→∅) − ) -> Result<Option<Inode>, super::UnrecordError<P::Error, T::TreeError>> {
+ ) -> Result<Option<Inode>, super::UnrecordError<P::Error, T>> {
replacement in libpijul/src/unrecord/working_copy.rs at line 185
[12.230916]→[12.21983:22047](∅→∅) − ) -> Result<(), super::UnrecordError<P::Error, T::TreeError>> {
+ ) -> Result<(), super::UnrecordError<P::Error, T>> {
replacement in libpijul/src/unrecord/mod.rs at line 11
[12.231752]→[12.7674:7773](∅→∅),
[12.7773]→[12.7773:7816](∅→∅),
[12.7816]→[12.7816:7820](∅→∅) − #[derive(Debug, Error)]
− pub enum UnrecordError<
− ChangestoreError: std::error::Error + 'static,
− TxnError: std::error::Error + 'static,
− > {
+ #[derive(Error)]
+ pub enum UnrecordError<ChangestoreError: std::error::Error + 'static, T: GraphTxnT + TreeTxnT> {
replacement in libpijul/src/unrecord/mod.rs at line 16
[12.7920]→[12.7920:7939](∅→∅) + Txn(#[from] TxnErr<T::GraphError>),
+ #[error(transparent)]
+ Tree(#[from] TreeErr<T::TreeError>),
replacement in libpijul/src/unrecord/mod.rs at line 20
[12.7965]→[12.22179:22237](∅→∅) − Block(#[from] crate::pristine::BlockError<TxnError>),
+ Block(#[from] crate::pristine::BlockError<T::GraphError>),
replacement in libpijul/src/unrecord/mod.rs at line 22
[12.8039]→[12.22238:22317](∅→∅) − InconsistentChange(#[from] crate::pristine::InconsistentChange<TxnError>),
+ InconsistentChange(#[from] crate::pristine::InconsistentChange<T::GraphError>),
replacement in libpijul/src/unrecord/mod.rs at line 31
[12.8352]→[12.8352:8421](∅→∅) − Missing(#[from] crate::missing_context::MissingError<TxnError>),
+ Missing(#[from] crate::missing_context::MissingError<T::GraphError>),
replacement in libpijul/src/unrecord/mod.rs at line 33
[12.8447]→[12.8447:8512](∅→∅) − LocalApply(#[from] crate::apply::LocalApplyError<TxnError>),
+ LocalApply(#[from] crate::apply::LocalApplyError<T>),
replacement in libpijul/src/unrecord/mod.rs at line 35
[12.8538]→[12.8538:8611](∅→∅) − Apply(#[from] crate::apply::ApplyError<ChangestoreError, TxnError>),
+ Apply(#[from] crate::apply::ApplyError<ChangestoreError, T>),
replacement in libpijul/src/unrecord/mod.rs at line 38
[12.22321]→[12.22321:22518](∅→∅) − impl<T: std::error::Error + 'static, C: std::error::Error + 'static> std::convert::From<TxnErr<T>>
− for UnrecordError<C, T>
− {
− fn from(t: TxnErr<T>) -> Self {
− UnrecordError::Txn(t.0)
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT> std::fmt::Debug for UnrecordError<C, T> {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ UnrecordError::Changestore(e) => std::fmt::Debug::fmt(e, fmt),
+ UnrecordError::Txn(e) => std::fmt::Debug::fmt(e, fmt),
+ UnrecordError::Tree(e) => std::fmt::Debug::fmt(e, fmt),
+ UnrecordError::Block(e) => std::fmt::Debug::fmt(e, fmt),
+ UnrecordError::InconsistentChange(e) => std::fmt::Debug::fmt(e, fmt),
+ UnrecordError::ChangeNotInChannel { hash } => {
+ write!(fmt, "Change not in channel: {}", hash.to_base32())
+ }
+ UnrecordError::ChangeIsDependedUpon {
+ change_id,
+ dependent,
+ } => write!(
+ fmt,
+ "Change {} is depended upon: {}",
+ change_id.to_base32(),
+ dependent.to_base32()
+ ),
+ UnrecordError::Missing(e) => std::fmt::Debug::fmt(e, fmt),
+ UnrecordError::LocalApply(e) => std::fmt::Debug::fmt(e, fmt),
+ UnrecordError::Apply(e) => std::fmt::Debug::fmt(e, fmt),
+ }
replacement in libpijul/src/unrecord/mod.rs at line 71
[12.2521]→[12.22525:22585](∅→∅),
[12.231881]→[12.22525:22585](∅→∅) − ) -> Result<bool, UnrecordError<P::Error, T::GraphError>> {
+ ) -> Result<bool, UnrecordError<P::Error, T>> {
replacement in libpijul/src/unrecord/mod.rs at line 103
[12.23047]→[12.23047:23123](∅→∅) − T: ChannelMutTxnT + DepsTxnT<DepsError = <T as GraphTxnT>::GraphError>,
+ T: ChannelMutTxnT + DepsTxnT<DepsError = <T as GraphTxnT>::GraphError> + TreeTxnT,
replacement in libpijul/src/unrecord/mod.rs at line 109
[12.232905]→[12.23147:23205](∅→∅) − ) -> Result<(), UnrecordError<P::Error, T::GraphError>> {
+ ) -> Result<(), UnrecordError<P::Error, T>> {
replacement in libpijul/src/unrecord/mod.rs at line 163
[12.2606]→[12.23858:23916](∅→∅),
[12.234187]→[12.23858:23916](∅→∅) − ) -> Result<(), UnrecordError<C::Error, T::GraphError>> {
+ ) -> Result<(), UnrecordError<C::Error, T>> {
replacement in libpijul/src/unrecord/mod.rs at line 255
[12.235980]→[12.24790:24845](∅→∅) − fn unapply_newvertex<T: GraphMutTxnT, C: ChangeStore>(
+ fn unapply_newvertex<T: GraphMutTxnT + TreeTxnT, C: ChangeStore>(
replacement in libpijul/src/unrecord/mod.rs at line 261
[12.236377]→[12.24875:24933](∅→∅) − ) -> Result<(), UnrecordError<C::Error, T::GraphError>> {
+ ) -> Result<(), UnrecordError<C::Error, T>> {
replacement in libpijul/src/unrecord/mod.rs at line 300
[12.1166]→[12.25014:25067](∅→∅) − fn perform_del<C: ChangeStore, T: GraphMutTxnT>(
+ fn perform_del<C: ChangeStore, T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/unrecord/mod.rs at line 305
[12.1322]→[12.25101:25163](∅→∅) − ) -> Result<(), UnrecordError<C::Error, T::GraphError>> {
+ ) -> Result<(), UnrecordError<C::Error, T>> {
replacement in libpijul/src/unrecord/mod.rs at line 325
[12.238934]→[12.25181:25244](∅→∅) − fn repair_newvertex_contexts<T: GraphMutTxnT, C: ChangeStore>(
+ fn repair_newvertex_contexts<T: GraphMutTxnT + TreeTxnT, C: ChangeStore>(
replacement in libpijul/src/unrecord/mod.rs at line 330
[12.1508]→[12.25274:25332](∅→∅) − ) -> Result<(), UnrecordError<C::Error, T::GraphError>> {
+ ) -> Result<(), UnrecordError<C::Error, T>> {
replacement in libpijul/src/unrecord/mod.rs at line 380
[12.10239]→[12.25474:25525](∅→∅) − fn unapply_edges<T: GraphMutTxnT, P: ChangeStore>(
+ fn unapply_edges<T: GraphMutTxnT + TreeTxnT, P: ChangeStore>(
replacement in libpijul/src/unrecord/mod.rs at line 388
[12.240557]→[12.25555:25613](∅→∅) − ) -> Result<(), UnrecordError<P::Error, T::GraphError>> {
+ ) -> Result<(), UnrecordError<P::Error, T>> {
replacement in libpijul/src/unrecord/mod.rs at line 448
[12.241975]→[12.25746:25797](∅→∅) − fn must_reintroduce<T: GraphTxnT, C: ChangeStore>(
+ fn must_reintroduce<T: GraphTxnT + TreeTxnT, C: ChangeStore>(
replacement in libpijul/src/unrecord/mod.rs at line 457
[12.1958]→[12.25823:25883](∅→∅) − ) -> Result<bool, UnrecordError<C::Error, T::GraphError>> {
+ ) -> Result<bool, UnrecordError<C::Error, T>> {
replacement in libpijul/src/unrecord/mod.rs at line 487
[12.243264]→[12.26210:26263](∅→∅) − fn edge_is_in_channel<T: GraphTxnT, C: ChangeStore>(
+ fn edge_is_in_channel<T: GraphTxnT + TreeTxnT, C: ChangeStore>(
replacement in libpijul/src/unrecord/mod.rs at line 493
[12.243431]→[12.26264:26324](∅→∅) − ) -> Result<bool, UnrecordError<C::Error, T::GraphError>> {
+ ) -> Result<bool, UnrecordError<C::Error, T>> {
replacement in libpijul/src/unrecord/mod.rs at line 514
[12.243938]→[12.26556:26608](∅→∅) − fn remove_zombies<T: GraphMutTxnT, C: ChangeStore>(
+ fn remove_zombies<T: GraphMutTxnT + TreeTxnT, C: ChangeStore>(
replacement in libpijul/src/unrecord/mod.rs at line 520
[12.244079]→[12.26638:26696](∅→∅) − ) -> Result<(), UnrecordError<C::Error, T::GraphError>> {
+ ) -> Result<(), UnrecordError<C::Error, T>> {
replacement in libpijul/src/unrecord/mod.rs at line 575
[12.3886]→[12.27056:27114](∅→∅) − fn repair_edges_context<T: GraphMutTxnT, P: ChangeStore>(
+ fn repair_edges_context<T: GraphMutTxnT + TreeTxnT, P: ChangeStore>(
replacement in libpijul/src/unrecord/mod.rs at line 582
[12.247082]→[12.27144:27202](∅→∅) − ) -> Result<(), UnrecordError<P::Error, T::GraphError>> {
+ ) -> Result<(), UnrecordError<P::Error, T>> {
replacement in libpijul/src/tests/unrecord.rs at line 335
[12.6130]→[11.50:90](∅→∅) − )?.into_iter().collect::<Vec<_>>();
+ )?
+ .into_iter()
+ .collect::<Vec<_>>();
edit in libpijul/src/tests/text_changes.rs at line 74
+
+ use crate::quickcheck::{Arbitrary, Gen};
replacement in libpijul/src/tests/text_changes.rs at line 80
[12.7782]→[12.7782:7815](∅→∅) − fn go(hunk: PrintableHunk) {
+ fn go(mut hunk: PrintableHunk) {
+ match hunk {
+ PrintableHunk::FileAddition {
+ ref perms,
+ ref mut contents,
+ ..
+ } => {
+ if let PrintablePerms::IsDir = perms {
+ contents.clear()
+ }
+ }
+ PrintableHunk::FileDel {
+ ref mut del_edges, ..
+ } => {
+ if del_edges.is_empty() {
+ del_edges.push(PrintableEdge::arbitrary(&mut Gen::new(3)))
+ }
+ }
+ PrintableHunk::FileUndel {
+ ref mut undel_edges,
+ ..
+ } => {
+ if undel_edges.is_empty() {
+ undel_edges.push(PrintableEdge::arbitrary(&mut Gen::new(3)))
+ }
+ }
+ PrintableHunk::Replace {
+ ref mut change_contents,
+ ref mut replacement_contents,
+ ..
+ } => {
+ if change_contents.is_empty() {
+ change_contents.push(b'a')
+ }
+ if replacement_contents.is_empty() {
+ replacement_contents.push(b'b')
+ }
+ }
+ PrintableHunk::Edit {
+ ref mut change,
+ ref mut contents,
+ ..
+ } => {
+ if let PrintableAtom::Edges(ref mut change) = change {
+ if change.is_empty() {
+ change.push(PrintableEdge::arbitrary(&mut Gen::new(3)))
+ }
+ }
+ if std::str::from_utf8(contents).is_err() {
+ contents.clear();
+ contents.extend(b"bla\n".iter().cloned())
+ }
+ }
+ _ => {}
+ }
replacement in libpijul/src/tests/file_conflicts.rs at line 918
[12.40603]→[11.291:331](∅→∅) − )?.into_iter().collect::<Vec<_>>();
+ )?
+ .into_iter()
+ .collect::<Vec<_>>();
replacement in libpijul/src/tests/file_conflicts.rs at line 966
[12.41437]→[11.332:372](∅→∅) − )?.into_iter().collect::<Vec<_>>();
+ )?
+ .into_iter()
+ .collect::<Vec<_>>();
replacement in libpijul/src/tests/file_conflicts.rs at line 1002
[12.41902]→[11.421:461](∅→∅) − )?.into_iter().collect::<Vec<_>>();
+ )?
+ .into_iter()
+ .collect::<Vec<_>>();
edit in libpijul/src/tag.rs at line 9
+ use std::io::{Seek, SeekFrom};
replacement in libpijul/src/tag.rs at line 13
[12.6637]→[12.6637:6687](∅→∅) − #[derive(Debug, Serialize, Deserialize, Default)]
+ pub mod txn;
+
+ #[derive(Debug, Serialize, Deserialize, Default, Clone)]
replacement in libpijul/src/tag.rs at line 26
[12.6841]→[12.6841:6891](∅→∅) − #[derive(Debug, Serialize, Deserialize, Default)]
+ #[derive(Debug, Serialize, Deserialize, Default, Clone)]
edit in libpijul/src/tag.rs at line 66
+ impl From<TxnErr<SanakirjaError>> for TxnErr<TagError> {
+ fn from(e: TxnErr<SanakirjaError>) -> Self {
+ TxnErr(TagError::Txn(e.0))
+ }
+ }
+
edit in libpijul/src/tag.rs at line 82
[12.1749]→[12.1749:1788](∅→∅) − use std::io::{Seek, SeekFrom};
edit in libpijul/src/tag.rs at line 101
[12.8219]→[12.8219:8254](∅→∅) − use std::io::{Seek, SeekFrom};
replacement in libpijul/src/record.rs at line 16
[12.11034]→[12.11034:11142](∅→∅),
[12.11142]→[12.11142:11178](∅→∅),
[12.11178]→[12.11178:11182](∅→∅) − #[derive(Debug, Error)]
− pub enum RecordError<
− C: std::error::Error + 'static,
− W: std::error::Error,
− T: std::error::Error + 'static,
− > {
+ #[derive(Error)]
+ pub enum RecordError<C: std::error::Error + 'static, W: std::error::Error, T: GraphTxnT + TreeTxnT>
+ {
replacement in libpijul/src/record.rs at line 26
[12.11423]→[12.11423:11435](∅→∅) + Txn(#[from] TxnErr<T::GraphError>),
+ #[error(transparent)]
+ Tree(#[from] TreeErr<T::TreeError>),
replacement in libpijul/src/record.rs at line 37
[12.489268]→[12.31822:32009](∅→∅) − impl<
− C: std::error::Error + 'static,
− W: std::error::Error + 'static,
− T: std::error::Error + 'static,
− > std::convert::From<TxnErr<T>> for RecordError<C, W, T>
+ impl<C: std::error::Error, W: std::error::Error, T: GraphTxnT + TreeTxnT> std::fmt::Debug
+ for RecordError<C, W, T>
replacement in libpijul/src/record.rs at line 40
[12.32011]→[12.32011:32077](∅→∅) − fn from(e: TxnErr<T>) -> Self {
− RecordError::Txn(e.0)
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ RecordError::Changestore(e) => std::fmt::Debug::fmt(e, fmt),
+ RecordError::WorkingCopy(e) => std::fmt::Debug::fmt(e, fmt),
+ RecordError::SystemTimeError(e) => std::fmt::Debug::fmt(e, fmt),
+ RecordError::Txn(e) => std::fmt::Debug::fmt(e, fmt),
+ RecordError::Tree(e) => std::fmt::Debug::fmt(e, fmt),
+ RecordError::Diff(e) => std::fmt::Debug::fmt(e, fmt),
+ RecordError::PathNotInRepo(p) => write!(fmt, "Path not in repository: {}", p),
+ RecordError::Io(e) => std::fmt::Debug::fmt(e, fmt),
+ }
replacement in libpijul/src/record.rs at line 54
[12.32086]→[12.0:86](∅→∅),
[12.86]→[12.86:126](∅→∅),
[12.126]→[12.126:208](∅→∅) − impl<
− C: std::error::Error + 'static,
− W: std::error::Error + 'static,
− T: std::error::Error + 'static,
− > std::convert::From<crate::output::FileError<C, T>> for RecordError<C, W, T>
+ impl<C: std::error::Error + 'static, W: std::error::Error + 'static, T: GraphTxnT + TreeTxnT>
+ std::convert::From<crate::output::FileError<C, T>> for RecordError<C, W, T>
replacement in libpijul/src/record.rs at line 103
[12.41250]→[12.41250:41310](∅→∅) − pub redundant: Vec<(Vertex<ChangeId>, SerializedEdge)>,
+ pub redundant: Vec<crate::alive::Redundant>,
replacement in libpijul/src/record.rs at line 234
[12.492241]→[12.43650:43735](∅→∅) − fn get_inodes_<T: ChannelTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>>(
+ fn get_inodes_<T: ChannelTxnT + TreeTxnT, C: ChangeStore, W: WorkingCopyRead>(
replacement in libpijul/src/record.rs at line 238
[12.43807]→[12.43807:43872](∅→∅) − ) -> Result<Option<Position<ChangeId>>, TxnErr<T::GraphError>> {
+ ) -> Result<Option<Position<ChangeId>>, RecordError<C::Error, W::Error, T>> {
replacement in libpijul/src/record.rs at line 241
[12.96491]→[12.43952:44009](∅→∅),
[12.43952]→[12.43952:44009](∅→∅) − Ok(get_inodes(&*txn, &*channel, inode)?.map(|x| *x))
+ Ok(get_inodes::<_, C, W>(&*txn, &*channel, inode)?.map(|x| *x))
replacement in libpijul/src/record.rs at line 244
[12.44012]→[12.48837:48925](∅→∅),
[12.492241]→[12.48837:48925](∅→∅) − fn get_inodes<'a, T: ChannelTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>>(
+ fn get_inodes<'a, T: ChannelTxnT + TreeTxnT, C: ChangeStore, W: WorkingCopyRead>(
replacement in libpijul/src/record.rs at line 248
[12.48961]→[12.48961:49030](∅→∅) − ) -> Result<Option<&'a Position<ChangeId>>, TxnErr<T::GraphError>> {
+ ) -> Result<Option<&'a Position<ChangeId>>, RecordError<C::Error, W::Error, T>> {
replacement in libpijul/src/record.rs at line 295
[12.44783]→[12.32586:32654](∅→∅),
[12.492891]→[12.32586:32654](∅→∅) − ) -> Result<(), RecordError<C::Error, W::Error, T::GraphError>>
+ ) -> Result<(), RecordError<C::Error, W::Error, T>>
replacement in libpijul/src/record.rs at line 297
[12.32664]→[12.44784:44810](∅→∅),
[12.44810]→[12.44810:44875](∅→∅),
[12.44875]→[12.44875:44936](∅→∅) − T: ChannelMutTxnT
− + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>
− + Send
− + Sync
− + 'static,
+ T: ChannelMutTxnT + TreeTxnT + Send + Sync + 'static,
replacement in libpijul/src/record.rs at line 343
[12.46611]→[12.1348:1424](∅→∅) − Ok::<_, RecordError<C::Error, W::Error, T::GraphError>>(())
+ Ok::<_, RecordError<C::Error, W::Error, T>>(())
replacement in libpijul/src/record.rs at line 408
[12.2980]→[12.97041:97126](∅→∅),
[12.493753]→[12.97041:97126](∅→∅) − } else if let Some(vertex) = get_inodes_(&txn, &channel, &item.inode)? {
+ } else if let Some(vertex) = get_inodes_::<_, C, W>(&txn, &channel, &item.inode)? {
replacement in libpijul/src/record.rs at line 544
[12.1]→[12.50500:50533](∅→∅),
[12.50533]→[12.50533:50608](∅→∅),
[12.50608]→[12.1600:1628](∅→∅),
[12.1628]→[12.50632:50663](∅→∅),
[12.50632]→[12.50632:50663](∅→∅) − fn delete_obsolete_children<
− T: GraphTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,
− W: WorkingCopyRead,
− C: ChangeStore,
− >(
+ fn delete_obsolete_children<T: GraphTxnT + TreeTxnT, W: WorkingCopyRead, C: ChangeStore>(
replacement in libpijul/src/record.rs at line 552
[12.50830]→[12.50830:50898](∅→∅) − ) -> Result<(), RecordError<C::Error, W::Error, T::GraphError>>
+ ) -> Result<(), RecordError<C::Error, W::Error, T>>
replacement in libpijul/src/record.rs at line 615
[12.53353]→[12.53353:53387](∅→∅),
[12.53387]→[12.53387:53464](∅→∅),
[12.53464]→[12.1678:1706](∅→∅),
[12.1706]→[12.53488:53519](∅→∅),
[12.53488]→[12.53488:53519](∅→∅) − fn push_children<
− 'a,
− T: ChannelTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,
− W: WorkingCopyRead,
− C: ChangeStore,
− >(
+ fn push_children<'a, T: ChannelTxnT + TreeTxnT, W: WorkingCopyRead, C: ChangeStore>(
replacement in libpijul/src/record.rs at line 626
[12.787]→[12.53804:53872](∅→∅),
[12.53804]→[12.53804:53872](∅→∅) − ) -> Result<(), RecordError<C::Error, W::Error, T::GraphError>>
+ ) -> Result<(), RecordError<C::Error, W::Error, T>>
replacement in libpijul/src/record.rs at line 674
[12.55614]→[12.55614:55697](∅→∅) − } else if let Some(vertex) = get_inodes(txn, &channel, child_inode)? {
+ } else if let Some(vertex) = get_inodes::<_, C, W>(txn, &channel, child_inode)? {
replacement in libpijul/src/record.rs at line 886
[12.499383]→[12.32948:32977](∅→∅),
[12.32977]→[12.57910:57987](∅→∅),
[12.57987]→[12.1883:1919](∅→∅),
[12.1919]→[12.33078:33109](∅→∅),
[12.98042]→[12.33078:33109](∅→∅),
[12.33078]→[12.33078:33109](∅→∅) − fn record_existing_file<
− T: ChannelTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,
− W: WorkingCopyRead + Clone,
− C: ChangeStore,
− >(
+ fn record_existing_file<T: ChannelTxnT + TreeTxnT, W: WorkingCopyRead + Clone, C: ChangeStore>(
replacement in libpijul/src/record.rs at line 898
[12.499681]→[12.33110:33178](∅→∅) − ) -> Result<(), RecordError<C::Error, W::Error, T::GraphError>>
+ ) -> Result<(), RecordError<C::Error, W::Error, T>>
replacement in libpijul/src/record.rs at line 946
[12.7302]→[12.7302:7328](∅→∅),
[12.7328]→[12.7328:7405](∅→∅),
[12.7405]→[12.7405:7472](∅→∅) − fn record_nondeleted<
− T: ChannelTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,
− W: WorkingCopyRead + Clone,
− C: ChangeStore,
− >(
+ fn record_nondeleted<T: ChannelTxnT + TreeTxnT, W: WorkingCopyRead + Clone, C: ChangeStore>(
replacement in libpijul/src/record.rs at line 961
[12.7876]→[12.7876:7944](∅→∅) − ) -> Result<(), RecordError<C::Error, W::Error, T::GraphError>>
+ ) -> Result<(), RecordError<C::Error, W::Error, T>>
replacement in libpijul/src/record.rs at line 1025
[12.503333]→[12.1990:2068](∅→∅) − fn record_moved_file<T: ChannelTxnT, C: ChangeStore, W: WorkingCopyRead>(
+ fn record_moved_file<T: ChannelTxnT + TreeTxnT, C: ChangeStore, W: WorkingCopyRead>(
replacement in libpijul/src/record.rs at line 1034
[12.2779]→[12.35880:35948](∅→∅),
[12.507905]→[12.35880:35948](∅→∅) − ) -> Result<(), RecordError<C::Error, W::Error, T::GraphError>>
+ ) -> Result<(), RecordError<C::Error, W::Error, T>>
replacement in libpijul/src/record.rs at line 1165
[12.5]→[12.10068:10147](∅→∅) − fn collect_former_parents<C: ChangeStore, W: WorkingCopyRead, T: ChannelTxnT>(
+ fn collect_former_parents<C: ChangeStore, W: WorkingCopyRead, T: ChannelTxnT + TreeTxnT>(
replacement in libpijul/src/record.rs at line 1170
[12.10235]→[12.10235:10316](∅→∅) − ) -> Result<(Vec<Parent>, bool), RecordError<C::Error, W::Error, T::GraphError>>
+ ) -> Result<(Vec<Parent>, bool), RecordError<C::Error, W::Error, T>>
replacement in libpijul/src/record.rs at line 1233
[12.510763]→[12.2139:2213](∅→∅) − fn collect_moved_edges<T: GraphTxnT, C: ChangeStore, W: WorkingCopyRead>(
+ fn collect_moved_edges<T: GraphTxnT + TreeTxnT, C: ChangeStore, W: WorkingCopyRead>(
replacement in libpijul/src/record.rs at line 1241
[12.1031]→[12.36183:36255](∅→∅),
[12.511024]→[12.36183:36255](∅→∅) − ) -> Result<MovedEdges, RecordError<C::Error, W::Error, T::GraphError>>
+ ) -> Result<MovedEdges, RecordError<C::Error, W::Error, T>>
replacement in libpijul/src/record.rs at line 1485
[12.60939]→[12.37155:37183](∅→∅),
[12.518341]→[12.37155:37183](∅→∅),
[12.37183]→[12.37183:37258](∅→∅),
[12.37258]→[12.2280:2308](∅→∅),
[12.2308]→[12.2864:2888](∅→∅),
[12.37282]→[12.2864:2888](∅→∅),
[12.2888]→[12.37282:37289](∅→∅),
[12.37282]→[12.37282:37289](∅→∅) − fn record_deleted_file<
− T: GraphTxnT + TreeTxnT<TreeError = <T as GraphTxnT>::GraphError>,
− W: WorkingCopyRead,
− C: ChangeStore,
− >(
+ fn record_deleted_file<T: GraphTxnT + TreeTxnT, W: WorkingCopyRead, C: ChangeStore>(
replacement in libpijul/src/record.rs at line 1493
[12.2910]→[12.2910:2978](∅→∅) − ) -> Result<(), RecordError<C::Error, W::Error, T::GraphError>>
+ ) -> Result<(), RecordError<C::Error, W::Error, T>>
replacement in libpijul/src/record.rs at line 1574
[12.521266]→[12.2358:2436](∅→∅) − fn delete_inode_vertex<T: GraphTxnT, C: ChangeStore, W: WorkingCopyRead>(
+ fn delete_inode_vertex<T: GraphTxnT + TreeTxnT, C: ChangeStore, W: WorkingCopyRead>(
replacement in libpijul/src/record.rs at line 1582
[12.521458]→[12.392:460](∅→∅) − ) -> Result<(), RecordError<C::Error, W::Error, T::GraphError>>
+ ) -> Result<(), RecordError<C::Error, W::Error, T>>
edit in libpijul/src/pristine/sanakirja.rs at line 53
+ impl std::convert::From<::sanakirja::Error> for TreeErr<SanakirjaError> {
+ fn from(e: ::sanakirja::Error) -> Self {
+ TreeErr(e.into())
+ }
+ }
+
edit in libpijul/src/pristine/sanakirja.rs at line 65
+ impl std::convert::From<TreeErr<::sanakirja::Error>> for TreeErr<SanakirjaError> {
+ fn from(e: TreeErr<::sanakirja::Error>) -> Self {
+ TreeErr(e.0.into())
+ }
+ }
+
replacement in libpijul/src/pristine/sanakirja.rs at line 459
[12.66347]→[12.31406:31437](∅→∅),
[12.31406]→[12.31406:31437](∅→∅) + next_adj(&self.txn, a).map(|x| x.map_err(|x| TxnErr(x.into())))
replacement in libpijul/src/pristine/sanakirja.rs at line 467
[12.66415]→[6.1103:1150](∅→∅) − find_block(&self.txn, &graph.graph, p)
+ Ok(find_block(&self.txn, &graph.graph, p)?)
replacement in libpijul/src/pristine/sanakirja.rs at line 475
[12.66483]→[6.1151:1202](∅→∅) − find_block_end(&self.txn, &graph.graph, p)
+ Ok(find_block_end(&self.txn, &graph.graph, p)?)
+ }
+ }
+
+ impl std::convert::From<BlockError<::sanakirja::Error>> for BlockError<SanakirjaError> {
+ fn from(e: BlockError<::sanakirja::Error>) -> Self {
+ match e {
+ BlockError::Txn(t) => BlockError::Txn(t.into()),
+ BlockError::Block { block } => BlockError::Block { block },
+ }
replacement in libpijul/src/pristine/sanakirja.rs at line 489
[12.32641]→[12.66484:66559](∅→∅) − pub fn next_adj<'a, T: ::sanakirja::LoadPage<Error = ::sanakirja::Error>>(
+ pub fn next_adj<'a, T: ::sanakirja::LoadPage>(
replacement in libpijul/src/pristine/sanakirja.rs at line 492
[12.32717]→[12.66576:66642](∅→∅) − ) -> Option<Result<&'a SerializedEdge, TxnErr<SanakirjaError>>> {
+ ) -> Option<Result<&'a SerializedEdge, T::Error>>
+ where
+ T::Error: std::error::Error,
+ {
replacement in libpijul/src/pristine/sanakirja.rs at line 512
[12.33418]→[12.33418:33476](∅→∅) − Err(e) => return Some(Err(TxnErr(e.into()))),
+ Err(e) => return Some(Err(e.into())),
replacement in libpijul/src/pristine/sanakirja.rs at line 521
[12.33630]→[12.66911:66988](∅→∅) − pub fn find_block<'a, T: ::sanakirja::LoadPage<Error = ::sanakirja::Error>>(
+ pub fn find_block<'a, T: ::sanakirja::LoadPage>(
replacement in libpijul/src/pristine/sanakirja.rs at line 525
[12.33771]→[12.67075:67139](∅→∅) − ) -> Result<&'a Vertex<ChangeId>, BlockError<SanakirjaError>> {
+ ) -> Result<&'a Vertex<ChangeId>, BlockError<T::Error>>
+ where
+ T::Error: std::error::Error,
+ {
replacement in libpijul/src/pristine/sanakirja.rs at line 581
[12.35630]→[12.67896:67977](∅→∅) − pub fn find_block_end<'a, T: ::sanakirja::LoadPage<Error = ::sanakirja::Error>>(
+ pub fn find_block_end<'a, T: ::sanakirja::LoadPage>(
replacement in libpijul/src/pristine/sanakirja.rs at line 585
[12.35775]→[12.68064:68128](∅→∅) − ) -> Result<&'a Vertex<ChangeId>, BlockError<SanakirjaError>> {
+ ) -> Result<&'a Vertex<ChangeId>, BlockError<T::Error>>
+ where
+ T::Error: std::error::Error,
+ {
replacement in libpijul/src/pristine/sanakirja.rs at line 744
[12.26309]→[12.26309:26384](∅→∅) − fn id<'a>(&self, c: &'a Self::Channel) -> &'a RemoteId {
− &c.id
+ fn id<'a>(&self, c: &'a Self::Channel) -> Option<&'a RemoteId> {
+ Some(&c.id)
replacement in libpijul/src/pristine/sanakirja.rs at line 1103
[12.617]→[12.43312:43459](∅→∅),
[12.43459]→[12.545701:545759](∅→∅),
[12.545701]→[12.545701:545759](∅→∅) − sanakirja_table_get!(inodes, Inode, Position<ChangeId>, TreeError);
− sanakirja_table_get!(revinodes, Position<ChangeId>, Inode, TreeError);
− sanakirja_cursor!(inodes, Inode, Position<ChangeId>);
+ sanakirja_table_get!(inodes, Inode, Position<ChangeId>, TreeError, TreeErr);
+ sanakirja_table_get!(revinodes, Position<ChangeId>, Inode, TreeError, TreeErr);
+ sanakirja_cursor!(inodes, Inode, Position<ChangeId>, TreeErr);
replacement in libpijul/src/pristine/sanakirja.rs at line 1107
[12.62891]→[12.647:708](∅→∅),
[12.647]→[12.647:708](∅→∅) − sanakirja_cursor!(revinodes, Position<ChangeId>, Inode);
+ sanakirja_cursor!(revinodes, Position<ChangeId>, Inode, TreeErr);
replacement in libpijul/src/pristine/sanakirja.rs at line 1110
[12.74910]→[12.74910:74969](∅→∅) − sanakirja_table_get!(tree, PathId, Inode, TreeError,);
+ sanakirja_table_get!(tree, PathId, Inode, TreeError, TreeErr);
replacement in libpijul/src/pristine/sanakirja.rs at line 1112
[12.8154]→[12.75069:75112](∅→∅),
[12.75069]→[12.75069:75112](∅→∅) − sanakirja_iter!(tree, PathId, Inode,);
+ sanakirja_iter!(tree, PathId, Inode, TreeErr);
replacement in libpijul/src/pristine/sanakirja.rs at line 1114
[12.8250]→[12.75215:75260](∅→∅),
[12.75215]→[12.75215:75260](∅→∅) − sanakirja_iter!(revtree, Inode, PathId);
+ sanakirja_iter!(revtree, Inode, PathId, TreeErr);
replacement in libpijul/src/pristine/sanakirja.rs at line 1117
[12.75300]→[12.75300:75362](∅→∅) − sanakirja_table_get!(revtree, Inode, PathId, TreeError,);
+ sanakirja_table_get!(revtree, Inode, PathId, TreeError, TreeErr);
replacement in libpijul/src/pristine/sanakirja.rs at line 1125
[12.75548]→[12.75548:75612](∅→∅) − sanakirja_cursor!(partials, SmallStr, Position<ChangeId>,);
+ sanakirja_cursor!(partials, SmallStr, Position<ChangeId>, TreeErr);
replacement in libpijul/src/pristine/sanakirja.rs at line 1132
[12.43762]→[12.43762:43795](∅→∅) − TxnErr<Self::TreeError>,
+ TreeErr<Self::TreeError>,
replacement in libpijul/src/pristine/sanakirja.rs at line 1145
[12.44027]→[12.44027:44059](∅→∅) − TxnErr<SanakirjaError>,
+ TreeErr<SanakirjaError>,
replacement in libpijul/src/pristine/sanakirja.rs at line 1155
[12.75989]→[12.44305:44337](∅→∅),
[12.44305]→[12.44305:44337](∅→∅) − TxnErr<SanakirjaError>,
+ TreeErr<SanakirjaError>,
replacement in libpijul/src/pristine/sanakirja.rs at line 1749
[12.51297]→[12.51297:51440](∅→∅) − sanakirja_put_del!(inodes, Inode, Position<ChangeId>, TreeError);
− sanakirja_put_del!(revinodes, Position<ChangeId>, Inode, TreeError);
+ sanakirja_put_del!(inodes, Inode, Position<ChangeId>, TreeError, TreeErr);
+ sanakirja_put_del!(revinodes, Position<ChangeId>, Inode, TreeError, TreeErr);
replacement in libpijul/src/pristine/sanakirja.rs at line 1752
[12.51441]→[12.85416:85533](∅→∅) − sanakirja_put_del!(tree, PathId, Inode, TreeError,);
− sanakirja_put_del!(revtree, Inode, PathId, TreeError,);
+ sanakirja_put_del!(tree, PathId, Inode, TreeError, TreeErr);
+ sanakirja_put_del!(revtree, Inode, PathId, TreeError, TreeErr);
replacement in libpijul/src/pristine/sanakirja.rs at line 1759
[12.51819]→[12.51819:51868](∅→∅) − ) -> Result<bool, TxnErr<Self::TreeError>> {
+ ) -> Result<bool, TreeErr<Self::TreeError>> {
replacement in libpijul/src/pristine/sanakirja.rs at line 1761
[12.51910]→[12.85534:85601](∅→∅) − Ok(btree::put(&mut self.txn, &mut self.partials, &k, &e)?)
+ btree::put(&mut self.txn, &mut self.partials, &k, &e).map_err(|e| TreeErr(e.into()))
replacement in libpijul/src/pristine/sanakirja.rs at line 1768
[12.52180]→[12.52180:52229](∅→∅) − ) -> Result<bool, TxnErr<Self::TreeError>> {
+ ) -> Result<bool, TreeErr<Self::TreeError>> {
replacement in libpijul/src/pristine/sanakirja.rs at line 1770
[12.52271]→[12.85602:85625](∅→∅),
[12.85625]→[12.85625:85652](∅→∅),
[12.85652]→[12.52323:52355](∅→∅),
[12.52323]→[12.52323:52355](∅→∅),
[12.52355]→[12.85653:85693](∅→∅),
[12.85693]→[12.52432:52444](∅→∅),
[12.52432]→[12.52432:52444](∅→∅) − Ok(btree::del(
− &mut self.txn,
− &mut self.partials,
− &k,
− e.as_ref(),
− )?)
+ btree::del(&mut self.txn, &mut self.partials, &k, e.as_ref()).map_err(|e| TreeErr(e.into()))
edit in libpijul/src/pristine/mod.rs at line 157
+ impl<T: ChannelTxnT> ChannelRef<T> {
+ pub fn new(t: T::Channel) -> Self {
+ ChannelRef {
+ r: Arc::new(RwLock::new(t)),
+ }
+ }
+ }
+
edit in libpijul/src/pristine/mod.rs at line 166
+
+ impl<T> ArcTxn<T> {
+ pub fn new(t: T) -> Self {
+ ArcTxn(Arc::new(RwLock::new(t)))
+ }
+ }
replacement in libpijul/src/pristine/mod.rs at line 317
[12.54262]→[12.54262:54320](∅→∅) − pub struct TxnErr<E: std::error::Error + 'static>(pub E);
+ pub struct TxnErr<E: std::error::Error + std::fmt::Debug + 'static>(pub E);
replacement in libpijul/src/pristine/mod.rs at line 320
[12.54350]→[12.54350:54414](∅→∅) − type GraphError: std::error::Error + Send + Sync + 'static;
+ type GraphError: std::error::Error + std::fmt::Debug + Send + Sync + 'static;
replacement in libpijul/src/pristine/mod.rs at line 369
[12.2520]→[12.36406:36466](∅→∅) − fn id<'a>(&self, c: &'a Self::Channel) -> &'a RemoteId;
+ fn id<'a>(&self, c: &'a Self::Channel) -> Option<&'a RemoteId>;
edit in libpijul/src/pristine/mod.rs at line 587
+ #[derive(Debug, Error)]
+ #[error(transparent)]
+ pub struct TreeErr<E: std::error::Error + std::fmt::Debug + 'static>(pub E);
+
replacement in libpijul/src/pristine/mod.rs at line 592
[12.56857]→[12.56857:56920](∅→∅) − type TreeError: std::error::Error + Send + Sync + 'static;
+ type TreeError: std::error::Error + std::fmt::Debug + Send + Sync + 'static;
replacement in libpijul/src/pristine/mod.rs at line 594
[12.589647]→[12.56921:56969](∅→∅),
[12.56969]→[12.102846:102889](∅→∅) − table_get!(tree, PathId, Inode, TreeError);
− iter!(tree, PathId, Inode, TreeError);
+ table_get!(tree, PathId, Inode, TreeError, TreeErr);
+ iter!(tree, PathId, Inode, TreeError, TreeErr);
replacement in libpijul/src/pristine/mod.rs at line 598
[12.589743]→[12.57018:57069](∅→∅),
[12.57069]→[12.102890:102936](∅→∅) − table_get!(revtree, Inode, PathId, TreeError);
− iter!(revtree, Inode, PathId, TreeError);
+ table_get!(revtree, Inode, PathId, TreeError, TreeErr);
+ iter!(revtree, Inode, PathId, TreeError, TreeErr);
replacement in libpijul/src/pristine/mod.rs at line 603
[12.964]→[12.57121:57248](∅→∅) − table_get!(inodes, Inode, Position<ChangeId>, TreeError);
− table_get!(revinodes, Position<ChangeId>, Inode, TreeError);
+ table_get!(inodes, Inode, Position<ChangeId>, TreeError, TreeErr);
+ table_get!(revinodes, Position<ChangeId>, Inode, TreeError, TreeErr);
replacement in libpijul/src/pristine/mod.rs at line 607
[12.589972]→[12.102937:103001](∅→∅),
[12.103001]→[12.57316:57375](∅→∅),
[12.57316]→[12.57316:57375](∅→∅) − cursor!(partials, SmallStr, Position<ChangeId>, TreeError);
− cursor!(inodes, Inode, Position<ChangeId>, TreeError);
+ cursor!(partials, SmallStr, Position<ChangeId>, TreeError, TreeErr);
+ cursor!(inodes, Inode, Position<ChangeId>, TreeError, TreeErr);
replacement in libpijul/src/pristine/mod.rs at line 613
[12.57503]→[12.57503:57536](∅→∅) − TxnErr<Self::TreeError>,
+ TreeErr<Self::TreeError>,
replacement in libpijul/src/pristine/mod.rs at line 617
[12.69547]→[12.57573:57635](∅→∅),
[12.57573]→[12.57573:57635](∅→∅) − cursor!(revinodes, Position<ChangeId>, Inode, TreeError);
+ cursor!(revinodes, Position<ChangeId>, Inode, TreeError, TreeErr);
replacement in libpijul/src/pristine/mod.rs at line 623
[12.57798]→[12.57798:57831](∅→∅) − TxnErr<Self::TreeError>,
+ TreeErr<Self::TreeError>,
replacement in libpijul/src/pristine/mod.rs at line 630
[12.103088]→[12.57945:57978](∅→∅),
[12.57945]→[12.57945:57978](∅→∅) − TxnErr<Self::TreeError>,
+ TreeErr<Self::TreeError>,
replacement in libpijul/src/pristine/mod.rs at line 799
[12.103823]→[12.61009:61061](∅→∅),
[12.61009]→[12.61009:61061](∅→∅) − ) -> Result<Option<String>, TxnErr<T::TreeError>> {
+ ) -> Result<Option<String>, TreeErr<T::TreeError>> {
replacement in libpijul/src/pristine/mod.rs at line 1462
[12.68035]→[12.108058:108187](∅→∅) − initialized_cursor!(tree, PathId, Inode, TreeTxnT, TreeError);
− initialized_cursor!(revtree, Inode, PathId, TreeTxnT, TreeError);
+ initialized_cursor!(tree, PathId, Inode, TreeTxnT, TreeError, TreeErr);
+ initialized_cursor!(revtree, Inode, PathId, TreeTxnT, TreeError, TreeErr);
replacement in libpijul/src/pristine/mod.rs at line 1465
[12.68241]→[12.15553:15635](∅→∅) − initialized_cursor!(partials, SmallStr, Position<ChangeId>, TreeTxnT, TreeError);
+ initialized_cursor!(
+ partials,
+ SmallStr,
+ Position<ChangeId>,
+ TreeTxnT,
+ TreeError,
+ TreeErr
+ );
replacement in libpijul/src/pristine/mod.rs at line 1489
[12.108355]→[12.68571:68648](∅→∅),
[12.621464]→[12.68571:68648](∅→∅),
[12.70159]→[12.68649:68729](∅→∅),
[12.1456]→[12.68649:68729](∅→∅) − initialized_cursor!(inodes, Inode, Position<ChangeId>, TreeTxnT, TreeError);
− initialized_cursor!(revinodes, Position<ChangeId>, Inode, TreeTxnT, TreeError);
+ initialized_cursor!(
+ inodes,
+ Inode,
+ Position<ChangeId>,
+ TreeTxnT,
+ TreeError,
+ TreeErr
+ );
+ initialized_cursor!(
+ revinodes,
+ Position<ChangeId>,
+ Inode,
+ TreeTxnT,
+ TreeError,
+ TreeErr
+ );
replacement in libpijul/src/pristine/mod.rs at line 1777
[12.73435]→[12.73435:73653](∅→∅) − put_del!(inodes, Inode, Position<ChangeId>, TreeError);
− put_del!(revinodes, Position<ChangeId>, Inode, TreeError);
− put_del!(tree, PathId, Inode, TreeError);
− put_del!(revtree, Inode, PathId, TreeError);
+ put_del!(inodes, Inode, Position<ChangeId>, TreeError, TreeErr);
+ put_del!(revinodes, Position<ChangeId>, Inode, TreeError, TreeErr);
+ put_del!(tree, PathId, Inode, TreeError, TreeErr);
+ put_del!(revtree, Inode, PathId, TreeError, TreeErr);
replacement in libpijul/src/pristine/mod.rs at line 1785
[12.73741]→[12.73741:73789](∅→∅) − ) -> Result<bool, TxnErr<Self::TreeError>>;
+ ) -> Result<bool, TreeErr<Self::TreeError>>;
replacement in libpijul/src/pristine/mod.rs at line 1791
[12.73886]→[12.73886:73934](∅→∅) − ) -> Result<bool, TxnErr<Self::TreeError>>;
+ ) -> Result<bool, TreeErr<Self::TreeError>>;
replacement in libpijul/src/pristine/mod.rs at line 1861
[12.110025]→[12.75029:75069](∅→∅),
[12.50207]→[12.75029:75069](∅→∅) − ) -> Result<(), TxnErr<T::TreeError>> {
+ ) -> Result<(), TreeErr<T::TreeError>> {
replacement in libpijul/src/pristine/mod.rs at line 1871
[12.110080]→[12.75122:75164](∅→∅),
[12.1646]→[12.75122:75164](∅→∅) − ) -> Result<bool, TxnErr<T::TreeError>> {
+ ) -> Result<bool, TreeErr<T::TreeError>> {
replacement in libpijul/src/pristine/mod.rs at line 1884
[12.110122]→[12.75215:75255](∅→∅),
[12.1947]→[12.75215:75255](∅→∅) − ) -> Result<(), TxnErr<T::TreeError>> {
+ ) -> Result<(), TreeErr<T::TreeError>> {
replacement in libpijul/src/pristine/mod.rs at line 1895
[12.110164]→[12.75306:75348](∅→∅),
[12.2155]→[12.75306:75348](∅→∅) − ) -> Result<bool, TxnErr<T::TreeError>> {
+ ) -> Result<bool, TreeErr<T::TreeError>> {
edit in libpijul/src/output/output.rs at line 5
+ use crate::alive::Redundant;
replacement in libpijul/src/output/output.rs at line 50
[12.73532]→[12.73532:73572](∅→∅) − T: MutTxnT + Send + Sync + 'static,
+ T: ChannelMutTxnT + TreeMutTxnT<TreeError = T::GraphError> + Send + Sync + 'static,
+ R: WorkingCopy + Send + Clone + Sync + 'static,
+ P: ChangeStore + Send + Clone + 'static,
+ >(
+ repo: &R,
+ changes: &P,
+ txn: &ArcTxn<T>,
+ channel: &ChannelRef<T>,
+ prefix: &str,
+ output_name_conflicts: bool,
+ if_modified_since: Option<std::time::SystemTime>,
+ n_workers: usize,
+ salt: u64,
+ ) -> Result<BTreeSet<Conflict>, OutputError<P::Error, T, R::Error>>
+ where
+ T::Channel: Send + Sync + 'static,
+ {
+ debug!("output_repository_no_pending: {:?}", prefix);
+ let (c, f) = output_repository(
+ repo,
+ changes,
+ txn.clone(),
+ channel.clone(),
+ ChangeId::ROOT,
+ &mut crate::path::components(prefix),
+ output_name_conflicts,
+ if_modified_since,
+ n_workers,
+ salt,
+ )?;
+ del_redundant(txn.clone(), channel.clone(), &f)?;
+ Ok(c)
+ }
+
+ /// Output updates the working copy after applying changes, including
+ /// the graph-file correspondence.
+ ///
+ /// **WARNING:** This overwrites the working copy, cancelling any
+ /// unrecorded change.
+ pub fn output_repository_no_pending_<
+ T: ChannelTxnT + TreeMutTxnT + Send + Sync + 'static,
replacement in libpijul/src/output/output.rs at line 103
[12.3573]→[8.102:182](∅→∅) − ) -> Result<BTreeSet<Conflict>, OutputError<P::Error, T::GraphError, R::Error>>
+ ) -> Result<BTreeSet<Conflict>, OutputError<P::Error, T, R::Error>>
replacement in libpijul/src/output/output.rs at line 108
[5.573]→[12.673269:673292](∅→∅),
[12.20153]→[12.673269:673292](∅→∅),
[12.73881]→[12.673269:673292](∅→∅),
[12.81983]→[12.673269:673292](∅→∅),
[12.673269]→[12.673269:673292](∅→∅) + let (c, _) = output_repository(
replacement in libpijul/src/output/output.rs at line 119
[12.1643]→[12.673474:673480](∅→∅),
[12.3588]→[12.673474:673480](∅→∅),
[12.73919]→[12.673474:673480](∅→∅),
[12.673474]→[12.673474:673480](∅→∅) replacement in libpijul/src/output/output.rs at line 124
[12.73936]→[12.73936:74029](∅→∅) − T: TreeMutTxnT + ChannelMutTxnT + GraphMutTxnT<GraphError = <T as TreeTxnT>::TreeError>,
+ T: TreeMutTxnT + ChannelTxnT + GraphTxnT,
replacement in libpijul/src/output/output.rs at line 135
[12.74309]→[12.0:77](∅→∅) − ) -> Result<Vec<Conflict>, OutputError<P::Error, T::GraphError, R::Error>> {
+ ) -> Result<(Vec<Conflict>, Vec<Redundant>), OutputError<P::Error, T, R::Error>> {
edit in libpijul/src/output/output.rs at line 140
+ let mut forward = Vec::new();
edit in libpijul/src/output/output.rs at line 155
replacement in libpijul/src/output/output.rs at line 170
[12.75449]→[12.115:133](∅→∅) + Ok((conflicts, forward))
replacement in libpijul/src/output/output.rs at line 175
[12.673568]→[12.75464:75621](∅→∅) − T: TreeMutTxnT
− + ChannelMutTxnT
− + GraphMutTxnT<GraphError = <T as TreeTxnT>::TreeError>
− + Send
− + Sync
− + 'static,
+ T: TreeMutTxnT + ChannelTxnT + GraphTxnT + Send + Sync + 'static,
replacement in libpijul/src/output/output.rs at line 190
[12.3604]→[8.183:262](∅→∅) − ) -> Result<BTreeSet<Conflict>, OutputError<P::Error, T::TreeError, R::Error>>
+ ) -> Result<(BTreeSet<Conflict>, Vec<Redundant>), OutputError<P::Error, T, R::Error>>
edit in libpijul/src/output/output.rs at line 221
replacement in libpijul/src/output/output.rs at line 258
[12.13998]→[8.300:350](∅→∅) − for x in t.join().unwrap()?.into_iter() {
+ let (a, b) = t.join().unwrap()?;
+ for x in a.into_iter() {
edit in libpijul/src/output/output.rs at line 262
+ for x in b.into_iter() {
+ state.redundant.push(x);
+ }
replacement in libpijul/src/output/output.rs at line 266
[12.14068]→[8.400:430](∅→∅) − for x in o?.into_iter() {
+ let (a, b) = o?;
+ for x in a.into_iter() {
edit in libpijul/src/output/output.rs at line 269
+ }
+ for x in b.into_iter() {
+ state.redundant.push(x);
replacement in libpijul/src/output/output.rs at line 276
[12.14225]→[12.14225:14249](∅→∅) + Ok((state.conflicts, state.redundant))
edit in libpijul/src/output/output.rs at line 309
+ redundant: Vec<Redundant>,
replacement in libpijul/src/output/output.rs at line 314
[12.15318]→[12.15318:15499](∅→∅) − T: TreeMutTxnT
− + ChannelMutTxnT
− + GraphMutTxnT<GraphError = <T as TreeTxnT>::TreeError>
− + Send
− + Sync
− + 'static,
+ T: TreeMutTxnT + ChannelTxnT + GraphTxnT + Send + Sync + 'static,
replacement in libpijul/src/output/output.rs at line 322
[12.15699]→[12.15699:15768](∅→∅) − ) -> Result<(), OutputError<P::Error, T::TreeError, R::Error>> {
+ ) -> Result<(), OutputError<P::Error, T, R::Error>> {
replacement in libpijul/src/output/output.rs at line 328
[12.15961]→[12.15961:16049](∅→∅) − collect_dead_files(&*txn_, graph, self.pending_change_id, Inode::ROOT)?
+ collect_dead_files::<_, R, P>(&*txn_, graph, self.pending_change_id, Inode::ROOT)?
replacement in libpijul/src/output/output.rs at line 395
[12.18329]→[12.18329:18510](∅→∅) − T: TreeMutTxnT
− + ChannelMutTxnT
− + GraphMutTxnT<GraphError = <T as TreeTxnT>::TreeError>
− + Send
− + Sync
− + 'static,
+ T: TreeMutTxnT + ChannelTxnT + GraphTxnT + Send + Sync + 'static,
replacement in libpijul/src/output/output.rs at line 407
[12.18884]→[12.18884:18953](∅→∅) − ) -> Result<(), OutputError<P::Error, T::TreeError, R::Error>> {
+ ) -> Result<(), OutputError<P::Error, T, R::Error>> {
replacement in libpijul/src/output/output.rs at line 518
[12.1502]→[12.82825:82892](∅→∅),
[12.21084]→[12.82825:82892](∅→∅) − fn move_or_create<T: TreeMutTxnT, R: WorkingCopy, C: ChangeStore>(
+ fn move_or_create<T: GraphTxnT + TreeMutTxnT, R: WorkingCopy, C: ChangeStore>(
replacement in libpijul/src/output/output.rs at line 528
[12.3647]→[12.82954:83022](∅→∅),
[12.679880]→[12.82954:83022](∅→∅) − ) -> Result<Inode, OutputError<C::Error, T::TreeError, R::Error>> {
+ ) -> Result<Inode, OutputError<C::Error, T, R::Error>> {
replacement in libpijul/src/output/output.rs at line 629
[12.22422]→[12.81259:81341](∅→∅) − fn output_item<T: ChannelMutTxnT + GraphMutTxnT, P: ChangeStore, W: WorkingCopy>(
+ fn output_item<T: ChannelTxnT + TreeTxnT, P: ChangeStore, W: WorkingCopy>(
replacement in libpijul/src/output/output.rs at line 638
[12.81425]→[12.84030:84096](∅→∅),
[12.683171]→[12.84030:84096](∅→∅),
[12.683347]→[12.683347:683381](∅→∅),
[12.683381]→[12.81426:81432](∅→∅),
[12.81432]→[12.103168:103236](∅→∅),
[12.103236]→[12.81518:81595](∅→∅),
[12.81518]→[12.81518:81595](∅→∅),
[12.81595]→[12.688:796](∅→∅),
[12.796]→[12.103237:103315](∅→∅),
[12.81670]→[12.103237:103315](∅→∅),
[12.103315]→[12.81760:81895](∅→∅),
[12.81760]→[12.81760:81895](∅→∅),
[12.81895]→[12.797:859](∅→∅),
[12.859]→[12.81895:81901](∅→∅),
[12.81895]→[12.81895:81901](∅→∅) − ) -> Result<(), OutputError<P::Error, T::GraphError, W::Error>> {
− let mut forward = Vec::new();
− {
− let txn = txn.read();
− let channel = channel.read();
− let mut l = retrieve(&*txn, txn.graph(&*channel), output_item.pos)?;
− let w = repo
− .write_file(&path, inode)
− .map_err(OutputError::WorkingCopy)?;
− let mut f = vertex_buffer::ConflictsWriter::new(w, &path, conflicts);
− alive::output_graph(changes, &*txn, &*channel, &mut f, &mut l, &mut forward)
− .map_err(PristineOutputError::from)?;
− use std::io::Write;
− f.w.flush().unwrap_or(())
− }
+ forward: &mut Vec<Redundant>,
+ ) -> Result<(), OutputError<P::Error, T, W::Error>> {
+ let txn = txn.read();
+ let channel = channel.read();
+ let mut l = retrieve(&*txn, txn.graph(&*channel), output_item.pos)?;
+ let w = repo
+ .write_file(&path, inode)
+ .map_err(OutputError::WorkingCopy)?;
+ let mut f = vertex_buffer::ConflictsWriter::new(w, &path, conflicts);
+ alive::output_graph(changes, &*txn, &*channel, &mut f, &mut l, forward)
+ .map_err(PristineOutputError::from)?;
+ use std::io::Write;
+ f.w.flush().unwrap_or(());
+ Ok(())
+ }
+
+ fn del_redundant<T: ChannelMutTxnT + GraphMutTxnT>(
+ txn: ArcTxn<T>,
+ channel: ChannelRef<T>,
+ forward: &[Redundant],
+ ) -> Result<(), TxnErr<T::GraphError>> {
replacement in libpijul/src/output/output.rs at line 664
[12.22668]→[12.683460:683504](∅→∅),
[12.82046]→[12.683460:683504](∅→∅),
[12.103386]→[12.683460:683504](∅→∅),
[12.683460]→[12.683460:683504](∅→∅) − for &(vertex, edge) in forward.iter() {
+ for ve in forward.iter() {
replacement in libpijul/src/output/output.rs at line 666
[12.683557]→[12.82047:82127](∅→∅),
[12.5032]→[12.683622:683698](∅→∅),
[12.55839]→[12.683622:683698](∅→∅),
[12.58453]→[12.683622:683698](∅→∅),
[12.82127]→[12.683622:683698](∅→∅),
[12.84234]→[12.683622:683698](∅→∅),
[12.121264]→[12.683622:683698](∅→∅),
[12.683622]→[12.683622:683698](∅→∅) − let dest = *txn.find_block(txn.graph(&*channel), edge.dest()).unwrap();
− debug!("deleting forward edge {:?} {:?} {:?}", vertex, dest, edge);
+ let dest = *txn.find_block(txn.graph(&*channel), ve.e.dest()).unwrap();
+ debug!("deleting forward edge {:?} {:?} {:?}", ve.v, dest, ve.e);
replacement in libpijul/src/output/output.rs at line 671
[12.82192]→[12.121265:121290](∅→∅),
[12.58489]→[12.121265:121290](∅→∅),
[12.121290]→[12.84335:84355](∅→∅),
[12.84335]→[12.84335:84355](∅→∅) replacement in libpijul/src/output/output.rs at line 674
[12.84373]→[12.121291:121325](∅→∅) replacement in libpijul/src/output/output.rs at line 706
[3.596]→[12.82193:82282](∅→∅),
[12.22806]→[12.82193:82282](∅→∅) − fn collect_dead_files<T: TreeTxnT + GraphTxnT<GraphError = <T as TreeTxnT>::TreeError>>(
+ fn collect_dead_files<T: TreeTxnT + GraphTxnT, W: WorkingCopy + Clone, C: ChangeStore>(
replacement in libpijul/src/output/output.rs at line 711
[12.683988]→[12.84536:84620](∅→∅) − ) -> Result<HashMap<OwnedPathId, (Inode, Option<String>)>, TxnErr<T::GraphError>> {
+ ) -> Result<HashMap<OwnedPathId, (Inode, Option<String>)>, OutputError<C::Error, T, W::Error>> {
replacement in libpijul/src/output/output.rs at line 751
[12.22808]→[12.404:536](∅→∅) − fn kill_dead_files<
− T: ChannelTxnT<GraphError = T::TreeError> + TreeMutTxnT,
− W: WorkingCopy + Clone,
− C: ChangeStore,
− >(
+ fn kill_dead_files<T: ChannelTxnT + TreeMutTxnT, W: WorkingCopy + Clone, C: ChangeStore>(
replacement in libpijul/src/output/output.rs at line 756
[12.685544]→[12.537:602](∅→∅) − ) -> Result<(), OutputError<C::Error, T::TreeError, W::Error>> {
+ ) -> Result<(), OutputError<C::Error, T, W::Error>> {
replacement in libpijul/src/output/mod.rs at line 11
[12.686366]→[12.23194:23218](∅→∅) − #[derive(Debug, Error)]
replacement in libpijul/src/output/mod.rs at line 14
[12.23291]→[12.23291:23329](∅→∅) − Txn: std::error::Error + 'static,
+ T: GraphTxnT + TreeTxnT,
edit in libpijul/src/output/mod.rs at line 17
[12.23369]→[12.23369:23409](∅→∅) − #[error("Working copy error: {0}")]
replacement in libpijul/src/output/mod.rs at line 18
[12.23429]→[12.23429:23455](∅→∅),
[12.23455]→[12.23455:23521](∅→∅) − #[error(transparent)]
− Pristine(#[from] PristineOutputError<ChangestoreError, Txn>),
+ Pristine(#[from] PristineOutputError<ChangestoreError, T>),
replacement in libpijul/src/output/mod.rs at line 21
[12.23524]→[12.23524:23548](∅→∅),
[12.23548]→[12.23548:23648](∅→∅) − #[derive(Debug, Error)]
− pub enum PristineOutputError<ChangestoreError: std::error::Error, Txn: std::error::Error + 'static>
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT, W: std::error::Error + Send> std::fmt::Debug
+ for OutputError<C, T, W>
replacement in libpijul/src/output/mod.rs at line 24
[12.23650]→[12.23650:23676](∅→∅),
[12.23676]→[12.23676:23690](∅→∅),
[12.23690]→[12.23690:23729](∅→∅) − #[error(transparent)]
− Txn(Txn),
− #[error("Changestore error: {0}")]
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ OutputError::WorkingCopy(e) => std::fmt::Debug::fmt(e, fmt),
+ OutputError::Pristine(e) => std::fmt::Debug::fmt(e, fmt),
+ }
+ }
+ }
+
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT, W: std::error::Error + Send> std::fmt::Display
+ for OutputError<C, T, W>
+ {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ OutputError::WorkingCopy(e) => std::fmt::Display::fmt(e, fmt),
+ OutputError::Pristine(e) => std::fmt::Display::fmt(e, fmt),
+ }
+ }
+ }
+
+ #[derive(Error)]
+ pub enum PristineOutputError<ChangestoreError: std::error::Error, T: GraphTxnT + TreeTxnT> {
+ Channel(#[from] TxnErr<T::GraphError>),
+ Tree(#[from] TreeErr<T::TreeError>),
edit in libpijul/src/output/mod.rs at line 48
[12.23764]→[12.23764:23790](∅→∅) replacement in libpijul/src/output/mod.rs at line 49
[12.23822]→[12.23822:23848](∅→∅),
[12.23848]→[12.23848:23889](∅→∅) − #[error(transparent)]
− Fs(#[from] crate::fs::FsError<Txn>),
+ Fs(#[from] crate::fs::FsError<T>),
replacement in libpijul/src/output/mod.rs at line 52
[12.85298]→[12.85298:85373](∅→∅) − impl<C: std::error::Error, T: std::error::Error + 'static> From<TxnErr<T>>
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT> std::fmt::Debug for PristineOutputError<C, T> {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ PristineOutputError::Channel(e) => std::fmt::Debug::fmt(e, fmt),
+ PristineOutputError::Tree(e) => std::fmt::Debug::fmt(e, fmt),
+ PristineOutputError::Changestore(e) => std::fmt::Debug::fmt(e, fmt),
+ PristineOutputError::Io(e) => std::fmt::Debug::fmt(e, fmt),
+ PristineOutputError::Fs(e) => std::fmt::Debug::fmt(e, fmt),
+ }
+ }
+ }
+
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT> std::fmt::Display
replacement in libpijul/src/output/mod.rs at line 67
[12.85409]→[12.85409:85483](∅→∅) − fn from(e: TxnErr<T>) -> Self {
− PristineOutputError::Txn(e.0)
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ PristineOutputError::Channel(e) => std::fmt::Display::fmt(e, fmt),
+ PristineOutputError::Tree(e) => std::fmt::Display::fmt(e, fmt),
+ PristineOutputError::Changestore(e) => std::fmt::Display::fmt(e, fmt),
+ PristineOutputError::Io(e) => std::fmt::Display::fmt(e, fmt),
+ PristineOutputError::Fs(e) => std::fmt::Display::fmt(e, fmt),
+ }
replacement in libpijul/src/output/mod.rs at line 78
[12.85492]→[12.82420:82553](∅→∅) − impl<C: std::error::Error, T: std::error::Error + 'static, W: std::error::Error + Send>
− From<TxnErr<T>> for OutputError<C, T, W>
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT, W: std::error::Error + Send>
+ From<TxnErr<T::GraphError>> for OutputError<C, T, W>
replacement in libpijul/src/output/mod.rs at line 81
[12.85620]→[12.85620:85656](∅→∅) − fn from(e: TxnErr<T>) -> Self {
+ fn from(e: TxnErr<T::GraphError>) -> Self {
replacement in libpijul/src/output/mod.rs at line 86
[12.24237]→[12.24237:24261](∅→∅),
[12.24261]→[12.85697:85797](∅→∅) − #[derive(Debug, Error)]
− pub enum FileError<ChangestoreError: std::error::Error + 'static, T: std::error::Error + 'static> {
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT, W: std::error::Error + Send>
+ From<TreeErr<T::TreeError>> for OutputError<C, T, W>
+ {
+ fn from(e: TreeErr<T::TreeError>) -> Self {
+ OutputError::Pristine(e.into())
+ }
+ }
+
+ #[derive(Error)]
+ pub enum FileError<ChangestoreError: std::error::Error + std::fmt::Debug + 'static, T: GraphTxnT> {
replacement in libpijul/src/output/mod.rs at line 99
[12.85824]→[12.85824:85836](∅→∅) + Txn(#[from] TxnErr<T::GraphError>),
replacement in libpijul/src/output/mod.rs at line 104
[12.24451]→[12.85837:85918](∅→∅) − impl<C: std::error::Error, T: std::error::Error + 'static> From<FileError<C, T>>
+ // Why can't I just derive Debug for `FileError`? The following is
+ // what I expect the derived impl would be.
+ impl<ChangestoreError: std::error::Error + std::fmt::Debug + 'static, T: GraphTxnT> std::fmt::Debug
+ for FileError<ChangestoreError, T>
+ {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ FileError::Changestore(ref c) => std::fmt::Debug::fmt(c, fmt),
+ FileError::Txn(ref c) => std::fmt::Debug::fmt(c, fmt),
+ FileError::Io(ref c) => std::fmt::Debug::fmt(c, fmt),
+ }
+ }
+ }
+
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT> From<FileError<C, T>>
replacement in libpijul/src/output/mod.rs at line 125
[12.24760]→[12.85962:86024](∅→∅) − FileError::Txn(t) => PristineOutputError::Txn(t),
+ FileError::Txn(t) => PristineOutputError::Channel(t),
edit in libpijul/src/output/mod.rs at line 127
[12.24770]→[12.24770:24779](∅→∅),
[12.24779]→[12.86025:86186](∅→∅) − }
− }
−
− impl<C: std::error::Error, T: std::error::Error + 'static> From<TxnErr<T>> for FileError<C, T> {
− fn from(e: TxnErr<T>) -> Self {
− FileError::Txn(e.0)
replacement in libpijul/src/output/mod.rs at line 140
[12.686566]→[12.86196:86247](∅→∅) − fn collect_children<T: GraphTxnT, P: ChangeStore>(
+ fn collect_children<T: GraphTxnT + TreeTxnT, P: ChangeStore>(
replacement in libpijul/src/output/mod.rs at line 150
[12.686842]→[12.86273:86337](∅→∅) − ) -> Result<(), PristineOutputError<P::Error, T::GraphError>> {
+ ) -> Result<(), PristineOutputError<P::Error, T>> {
replacement in libpijul/src/output/mod.rs at line 214
[12.689116]→[12.22847:22889](∅→∅) − fn collect<T: GraphTxnT, P: ChangeStore>(
+ fn collect<T: GraphTxnT + TreeTxnT, P: ChangeStore>(
replacement in libpijul/src/output/mod.rs at line 224
[12.23141]→[12.23141:23205](∅→∅) − ) -> Result<(), PristineOutputError<P::Error, T::GraphError>> {
+ ) -> Result<(), PristineOutputError<P::Error, T>> {
replacement in libpijul/src/output/mod.rs at line 320
[12.82820]→[12.82820:82874](∅→∅) − ) -> Result<(), FileError<C::Error, T::GraphError>> {
+ ) -> Result<(), FileError<C::Error, T>> {
replacement in libpijul/src/output/archive.rs at line 98
[12.25223]→[12.25223:25247](∅→∅) − #[derive(Debug, Error)]
replacement in libpijul/src/output/archive.rs at line 101
[12.25306]→[12.25306:25342](∅→∅) − T: std::error::Error + 'static,
+ T: GraphTxnT + TreeTxnT,
replacement in libpijul/src/output/archive.rs at line 109
[12.25444]→[12.25444:25456](∅→∅) + Txn(#[from] TxnErr<T::GraphError>),
+ #[error(transparent)]
+ Tree(#[from] TreeErr<T::TreeError>),
replacement in libpijul/src/output/archive.rs at line 124
[12.692169]→[12.87545:87733](∅→∅) − impl<
− P: std::error::Error + 'static,
− T: std::error::Error + 'static,
− A: std::error::Error + 'static,
− > std::convert::From<TxnErr<T>> for ArchiveError<P, T, A>
+ impl<P: std::error::Error + 'static, T: GraphTxnT + TreeTxnT, A: std::error::Error + 'static>
+ std::fmt::Debug for ArchiveError<P, T, A>
replacement in libpijul/src/output/archive.rs at line 127
[12.87735]→[12.87735:87802](∅→∅) − fn from(e: TxnErr<T>) -> Self {
− ArchiveError::Txn(e.0)
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ ArchiveError::A(e) => std::fmt::Debug::fmt(e, fmt),
+ ArchiveError::P(e) => std::fmt::Debug::fmt(e, fmt),
+ ArchiveError::Txn(e) => std::fmt::Debug::fmt(e, fmt),
+ ArchiveError::Tree(e) => std::fmt::Debug::fmt(e, fmt),
+ ArchiveError::Unrecord(e) => std::fmt::Debug::fmt(e, fmt),
+ ArchiveError::Apply(e) => std::fmt::Debug::fmt(e, fmt),
+ ArchiveError::File(e) => std::fmt::Debug::fmt(e, fmt),
+ ArchiveError::Output(e) => std::fmt::Debug::fmt(e, fmt),
+ ArchiveError::StateNotFound { state } => write!(fmt, "State not found: {:?}", state),
+ }
replacement in libpijul/src/output/archive.rs at line 144
[12.87842]→[12.246:319](∅→∅) − T: ChannelTxnT + DepsTxnT<DepsError = <T as GraphTxnT>::GraphError>,
+ T: ChannelTxnT + TreeTxnT + DepsTxnT<DepsError = <T as GraphTxnT>::GraphError>,
replacement in libpijul/src/output/archive.rs at line 154
[12.692359]→[12.87935:88013](∅→∅) − ) -> Result<Vec<Conflict>, ArchiveError<P::Error, T::GraphError, A::Error>> {
+ ) -> Result<Vec<Conflict>, ArchiveError<P::Error, T, A::Error>> {
replacement in libpijul/src/lib.rs at line 111
− crate::apply::ApplyError<C::Error, Self::GraphError>,
+ crate::apply::ApplyError<C::Error, Self>,
replacement in libpijul/src/lib.rs at line 122
[12.720799]→[12.93117:93214](∅→∅) − ) -> Result<(u64, pristine::Merkle), crate::apply::ApplyError<C::Error, Self::GraphError>> {
+ ) -> Result<(u64, pristine::Merkle), crate::apply::ApplyError<C::Error, Self>> {
replacement in libpijul/src/lib.rs at line 132
[12.721167]→[12.93215:93291](∅→∅) − ) -> Result<(), crate::apply::ApplyError<C::Error, Self::GraphError>> {
+ ) -> Result<(), crate::apply::ApplyError<C::Error, Self>> {
replacement in libpijul/src/lib.rs at line 141
[12.126039]→[12.93292:93389](∅→∅),
[12.721471]→[12.93292:93389](∅→∅) − ) -> Result<(u64, pristine::Merkle), crate::apply::ApplyError<C::Error, Self::GraphError>> {
+ ) -> Result<(u64, pristine::Merkle), crate::apply::ApplyError<C::Error, Self>> {
replacement in libpijul/src/lib.rs at line 150
[12.126071]→[12.93390:93466](∅→∅),
[12.721775]→[12.93390:93466](∅→∅) − ) -> Result<(), crate::apply::ApplyError<C::Error, Self::GraphError>> {
+ ) -> Result<(), crate::apply::ApplyError<C::Error, Self>> {
replacement in libpijul/src/lib.rs at line 159
[12.126103]→[12.93467:93543](∅→∅),
[12.722067]→[12.93467:93543](∅→∅) − ) -> Result<(), crate::apply::ApplyError<C::Error, Self::GraphError>> {
+ ) -> Result<(), crate::apply::ApplyError<C::Error, Self>> {
replacement in libpijul/src/lib.rs at line 170
[12.722441]→[12.93544:93636](∅→∅) − ) -> Result<(u64, pristine::Merkle), crate::apply::LocalApplyError<Self::GraphError>> {
+ ) -> Result<(u64, pristine::Merkle), crate::apply::LocalApplyError<Self>> {
replacement in libpijul/src/lib.rs at line 180
[12.722831]→[12.93637:93729](∅→∅) − ) -> Result<(u64, pristine::Merkle), crate::apply::LocalApplyError<Self::GraphError>> {
+ ) -> Result<(u64, pristine::Merkle), crate::apply::LocalApplyError<Self>> {
replacement in libpijul/src/lib.rs at line 189
[12.724094]→[12.94455:94543](∅→∅) − ) -> Result<pristine::Hash, crate::apply::ApplyError<C::Error, Self::GraphError>> {
+ ) -> Result<pristine::Hash, crate::apply::ApplyError<C::Error, Self>> {
replacement in libpijul/src/lib.rs at line 218
[12.28705]→[12.126168:126257](∅→∅) − apply::apply_local_change(self, channel, &change, &hash, &recorded.updatables)?;
+ apply::apply_local_change(self, channel, &change, &hash, &recorded.updatables)
+ .map_err(ApplyError::LocalChange)?;
replacement in libpijul/src/lib.rs at line 229
[12.4209]→[12.94606:94683](∅→∅),
[12.725363]→[12.94606:94683](∅→∅) − ) -> Result<bool, unrecord::UnrecordError<C::Error, Self::GraphError>> {
+ ) -> Result<bool, unrecord::UnrecordError<C::Error, Self>> {
replacement in libpijul/src/lib.rs at line 236
[12.726194]→[12.610:710](∅→∅) − fn add_file(&mut self, path: &str, salt: u64) -> Result<Inode, fs::FsError<Self::GraphError>> {
+ fn add_file(&mut self, path: &str, salt: u64) -> Result<Inode, fs::FsError<Self>> {
replacement in libpijul/src/lib.rs at line 244
[12.726545]→[12.711:810](∅→∅) − fn add_dir(&mut self, path: &str, salt: u64) -> Result<Inode, fs::FsError<Self::GraphError>> {
+ fn add_dir(&mut self, path: &str, salt: u64) -> Result<Inode, fs::FsError<Self>> {
replacement in libpijul/src/lib.rs at line 251
[12.726871]→[12.3163:3255](∅→∅),
[12.3255]→[12.811:867](∅→∅) − fn add(
− &mut self,
− path: &str,
− is_dir: bool,
− salt: u64,
− ) -> Result<Inode, fs::FsError<Self::GraphError>> {
+ fn add(&mut self, path: &str, is_dir: bool, salt: u64) -> Result<Inode, fs::FsError<Self>> {
replacement in libpijul/src/lib.rs at line 255
[12.727005]→[12.3309:3399](∅→∅),
[12.3399]→[12.3399:3452](∅→∅) − fn move_file(
− &mut self,
− a: &str,
− b: &str,
− salt: u64,
− ) -> Result<(), fs::FsError<Self::GraphError>> {
+ fn move_file(&mut self, a: &str, b: &str, salt: u64) -> Result<(), fs::FsError<Self>> {
replacement in libpijul/src/lib.rs at line 259
[12.727123]→[12.95152:95238](∅→∅) − fn remove_file(&mut self, a: &str) -> Result<(), fs::FsError<Self::GraphError>> {
+ fn remove_file(&mut self, a: &str) -> Result<(), fs::FsError<Self>> {
replacement in libpijul/src/lib.rs at line 271
[12.4899]→[12.95357:95456](∅→∅),
[12.728008]→[12.95357:95456](∅→∅),
[12.95456]→[12.95456:95462](∅→∅) − ) -> Result<Vec<output::Conflict>, output::ArchiveError<P::Error, Self::GraphError, A::Error>>
− {
+ ) -> Result<Vec<output::Conflict>, output::ArchiveError<P::Error, Self, A::Error>> {
replacement in libpijul/src/lib.rs at line 300
[12.4938]→[12.95463:95562](∅→∅),
[12.728757]→[12.95463:95562](∅→∅),
[12.95562]→[12.95562:95568](∅→∅) − ) -> Result<Vec<output::Conflict>, output::ArchiveError<P::Error, Self::GraphError, A::Error>>
− {
+ ) -> Result<Vec<output::Conflict>, output::ArchiveError<P::Error, Self, A::Error>> {
replacement in libpijul/src/lib.rs at line 494
[12.128217]→[12.2074:2163](∅→∅) − ) -> Result<Option<(String, bool)>, output::FileError<C::Error, Self::GraphError>> {
+ ) -> Result<Option<(String, bool)>, output::FileError<C::Error, Self>> {
replacement in libpijul/src/lib.rs at line 507
[12.732453]→[12.2164:2253](∅→∅) − ) -> Result<Option<(String, bool)>, output::FileError<C::Error, Self::GraphError>> {
+ ) -> Result<Option<(String, bool)>, output::FileError<C::Error, Self>> {
replacement in libpijul/src/lib.rs at line 520
[12.732890]→[12.98802:98875](∅→∅),
[12.98875]→[12.98875:98925](∅→∅),
[12.98925]→[12.98925:98933](∅→∅) − ) -> Result<
− (pristine::Position<pristine::ChangeId>, bool),
− fs::FsErrorC<C::Error, Self::GraphError>,
− > {
+ ) -> Result<(pristine::Position<pristine::ChangeId>, bool), fs::FsErrorC<C::Error, Self>> {
replacement in libpijul/src/lib.rs at line 529
[12.733724]→[12.99144:99243](∅→∅),
[12.99243]→[12.99243:99249](∅→∅) − ) -> Result<Vec<output::Conflict>, output::ArchiveError<C::Error, Self::GraphError, A::Error>>
− {
+ ) -> Result<Vec<output::Conflict>, output::ArchiveError<C::Error, Self, A::Error>> {
replacement in libpijul/src/lib.rs at line 539
[12.734091]→[12.99250:99349](∅→∅),
[12.99349]→[12.99349:99355](∅→∅) − ) -> Result<Vec<output::Conflict>, output::ArchiveError<C::Error, Self::GraphError, A::Error>>
− {
+ ) -> Result<Vec<output::Conflict>, output::ArchiveError<C::Error, Self, A::Error>> {
replacement in libpijul/src/fs.rs at line 23
[12.1]→[12.30426:30450](∅→∅),
[12.30450]→[12.30450:30501](∅→∅) − #[derive(Debug, Error)]
− pub enum FsError<T: std::error::Error + 'static> {
+ #[derive(Error)]
+ pub enum FsError<T: TreeTxnT> {
replacement in libpijul/src/fs.rs at line 30
[12.101618]→[12.101618:101630](∅→∅) + Tree(#[from] TreeErr<T::TreeError>),
replacement in libpijul/src/fs.rs at line 35
[12.101633]→[12.101633:101657](∅→∅),
[12.101657]→[12.101657:101741](∅→∅) − #[derive(Debug, Error)]
− pub enum FsErrorC<C: std::error::Error + 'static, T: std::error::Error + 'static> {
+ impl<T: TreeTxnT> std::fmt::Debug for FsError<T> {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ FsError::NotFound(e) => std::fmt::Debug::fmt(e, fmt),
+ FsError::AlreadyInRepo(e) => write!(fmt, "File already in repository: {}", e),
+ FsError::Tree(e) => std::fmt::Debug::fmt(e, fmt),
+ FsError::InvalidPath(e) => write!(fmt, "Invalid path: {}", e),
+ }
+ }
+ }
+
+ #[derive(Error)]
+ pub enum FsErrorC<C: std::error::Error + 'static, T: GraphTxnT> {
replacement in libpijul/src/fs.rs at line 49
[12.30660]→[12.30660:30672](∅→∅) + Txn(#[from] TxnErr<T::GraphError>),
edit in libpijul/src/fs.rs at line 56
+ impl<C: std::error::Error + 'static, T: GraphTxnT> std::fmt::Debug for FsErrorC<C, T> {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ FsErrorC::Txn(e) => std::fmt::Debug::fmt(e, fmt),
+ FsErrorC::Changestore(e) => std::fmt::Debug::fmt(e, fmt),
+ FsErrorC::NotFound(e) => std::fmt::Debug::fmt(e, fmt),
+ }
+ }
+ }
+
edit in libpijul/src/fs.rs at line 70
[12.101939]→[12.101939:102093](∅→∅),
[12.102093]→[12.102093:102094](∅→∅),
[12.102094]→[12.102094:102287](∅→∅),
[12.102287]→[12.30672:30675](∅→∅),
[12.30672]→[12.30672:30675](∅→∅) − impl<T: std::error::Error + 'static> std::convert::From<TxnErr<T>> for FsError<T> {
− fn from(e: TxnErr<T>) -> Self {
− FsError::Txn(e.0)
− }
− }
−
− impl<C: std::error::Error + 'static, T: std::error::Error + 'static> std::convert::From<TxnErr<T>>
− for FsErrorC<C, T>
− {
− fn from(e: TxnErr<T>) -> Self {
− FsErrorC::Txn(e.0)
− }
− }
−
replacement in libpijul/src/fs.rs at line 74
[12.3557]→[12.3557:3600](∅→∅) − ) -> Result<Inode, TxnErr<T::TreeError>> {
+ ) -> Result<Inode, TreeErr<T::TreeError>> {
replacement in libpijul/src/fs.rs at line 89
[12.738959]→[12.102471:102567](∅→∅) − pub fn is_directory<T: TreeTxnT>(txn: &T, inode: Inode) -> Result<bool, TxnErr<T::TreeError>> {
+ pub fn is_directory<T: TreeTxnT>(txn: &T, inode: Inode) -> Result<bool, TreeErr<T::TreeError>> {
replacement in libpijul/src/fs.rs at line 108
[12.739519]→[12.102762:102857](∅→∅) − ) -> Result<(Inode, std::iter::Peekable<crate::path::Components<'a>>), TxnErr<T::TreeError>> {
+ ) -> Result<(Inode, std::iter::Peekable<crate::path::Components<'a>>), TreeErr<T::TreeError>> {
replacement in libpijul/src/fs.rs at line 143
[12.30737]→[12.102992:103086](∅→∅) − pub fn find_inode<T: TreeTxnT>(txn: &T, path: &str) -> Result<Inode, FsError<T::TreeError>> {
+ pub fn find_inode<T: TreeTxnT>(txn: &T, path: &str) -> Result<Inode, FsError<T>> {
replacement in libpijul/src/fs.rs at line 156
[12.741242]→[12.103225:103317](∅→∅) − pub fn is_tracked<T: TreeTxnT>(txn: &T, path: &str) -> Result<bool, TxnErr<T::TreeError>> {
+ pub fn is_tracked<T: TreeTxnT>(txn: &T, path: &str) -> Result<bool, TreeErr<T::TreeError>> {
replacement in libpijul/src/fs.rs at line 167
[12.103521]→[12.103521:103573](∅→∅) − ) -> Result<Option<String>, TxnErr<T::TreeError>> {
+ ) -> Result<Option<String>, TreeErr<T::TreeError>> {
replacement in libpijul/src/fs.rs at line 205
[12.5473]→[12.103713:103757](∅→∅),
[12.742759]→[12.103713:103757](∅→∅) − ) -> Result<Inode, FsError<T::TreeError>> {
+ ) -> Result<Inode, FsError<T>> {
replacement in libpijul/src/fs.rs at line 253
[12.5552]→[12.963:1007](∅→∅) − ) -> Result<Inode, FsError<T::TreeError>> {
+ ) -> Result<Inode, FsError<T>> {
replacement in libpijul/src/fs.rs at line 282
[12.5733]→[12.104492:104533](∅→∅),
[12.745846]→[12.104492:104533](∅→∅) − ) -> Result<(), FsError<T::TreeError>> {
+ ) -> Result<(), FsError<T>> {
replacement in libpijul/src/fs.rs at line 293
[12.5825]→[12.104578:104619](∅→∅),
[12.746112]→[12.104578:104619](∅→∅) − ) -> Result<(), FsError<T::TreeError>> {
+ ) -> Result<(), FsError<T>> {
replacement in libpijul/src/fs.rs at line 316
[12.653]→[12.104803:104844](∅→∅),
[12.747021]→[12.104803:104844](∅→∅) − ) -> Result<(), FsError<T::TreeError>> {
+ ) -> Result<(), FsError<T>> {
replacement in libpijul/src/fs.rs at line 359
[12.748753]→[12.105212:105311](∅→∅) − pub fn remove_file<T: TreeMutTxnT>(txn: &mut T, path: &str) -> Result<(), FsError<T::TreeError>> {
+ pub fn remove_file<T: TreeMutTxnT>(txn: &mut T, path: &str) -> Result<(), FsError<T>> {
replacement in libpijul/src/fs.rs at line 849
[12.759162]→[12.113217:113294](∅→∅) − ) -> Result<(Position<ChangeId>, bool), FsErrorC<C::Error, T::GraphError>> {
+ ) -> Result<(Position<ChangeId>, bool), FsErrorC<C::Error, T>> {
replacement in libpijul/src/fs.rs at line 924
[12.761102]→[12.2254:2343](∅→∅) − ) -> Result<Option<(String, bool)>, crate::output::FileError<C::Error, T::GraphError>> {
+ ) -> Result<Option<(String, bool)>, crate::output::FileError<C::Error, T>> {
replacement in libpijul/src/fs.rs at line 941
[12.798]→[12.2651:2736](∅→∅),
[12.2651]→[12.2651:2736](∅→∅) − Err(BlockError::Txn(t)) => return Err(crate::output::FileError::Txn(t)),
+ Err(BlockError::Txn(t)) => return Err(crate::output::FileError::Txn(TxnErr(t))),
replacement in libpijul/src/diff/mod.rs at line 61
[12.33220]→[12.33220:33244](∅→∅),
[12.33244]→[12.115465:115550](∅→∅) − #[derive(Debug, Error)]
− pub enum DiffError<P: std::error::Error + 'static, T: std::error::Error + 'static> {
+ #[derive(Error)]
+ pub enum DiffError<P: std::error::Error + 'static, T: GraphTxnT> {
replacement in libpijul/src/diff/mod.rs at line 66
[12.33323]→[12.115629:115641](∅→∅) + Txn(#[from] TxnErr<T::GraphError>),
replacement in libpijul/src/diff/mod.rs at line 69
[12.115644]→[12.115644:115833](∅→∅) − impl<T: std::error::Error + 'static, C: std::error::Error + 'static> std::convert::From<TxnErr<T>>
− for DiffError<C, T>
− {
− fn from(e: TxnErr<T>) -> Self {
− DiffError::Txn(e.0)
+ impl<P: std::error::Error, T: GraphTxnT> std::fmt::Debug for DiffError<P, T> {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ DiffError::Output(e) => std::fmt::Debug::fmt(e, fmt),
+ DiffError::Txn(e) => std::fmt::Debug::fmt(e, fmt),
+ }
replacement in libpijul/src/diff/mod.rs at line 143
[12.715]→[12.115897:115955](∅→∅),
[12.1928]→[12.115897:115955](∅→∅),
[12.794388]→[12.115897:115955](∅→∅) − ) -> Result<(), DiffError<P::Error, T::GraphError>> {
+ ) -> Result<(), DiffError<P::Error, T>> {
replacement in libpijul/src/apply.rs at line 14
[12.93418]→[12.93418:93442](∅→∅),
[12.93442]→[12.93442:93540](∅→∅),
[12.93540]→[12.93540:93579](∅→∅) − #[derive(Debug, Error)]
− pub enum ApplyError<ChangestoreError: std::error::Error, TxnError: std::error::Error + 'static> {
− #[error("Changestore error: {0}")]
+ pub enum ApplyError<ChangestoreError: std::error::Error, T: GraphTxnT + TreeTxnT> {
replacement in libpijul/src/apply.rs at line 16
[12.93614]→[12.93614:93690](∅→∅),
[12.93690]→[12.93690:93730](∅→∅),
[12.93730]→[12.93730:93737](∅→∅) − #[error("Local change error: {err}")]
− LocalChange {
− #[from]
− err: LocalApplyError<TxnError>,
− },
+ LocalChange(LocalApplyError<T>),
+ }
+
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT> std::fmt::Debug for ApplyError<C, T> {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ ApplyError::Changestore(e) => std::fmt::Debug::fmt(e, fmt),
+ ApplyError::LocalChange(e) => std::fmt::Debug::fmt(e, fmt),
+ }
+ }
+ }
+
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT> std::fmt::Display for ApplyError<C, T> {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ ApplyError::Changestore(e) => std::fmt::Display::fmt(e, fmt),
+ ApplyError::LocalChange(e) => std::fmt::Display::fmt(e, fmt),
+ }
+ }
edit in libpijul/src/apply.rs at line 36
+
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT> std::error::Error for ApplyError<C, T> {}
replacement in libpijul/src/apply.rs at line 39
[12.93740]→[12.93740:93764](∅→∅),
[12.93764]→[12.123034:123100](∅→∅),
[12.123100]→[12.93820:93867](∅→∅),
[12.93820]→[12.93820:93867](∅→∅) − #[derive(Debug, Error)]
− pub enum LocalApplyError<TxnError: std::error::Error + 'static> {
− #[error("Dependency missing: {:?}", hash)]
+ #[derive(Error)]
+ pub enum LocalApplyError<T: GraphTxnT + TreeTxnT> {
edit in libpijul/src/apply.rs at line 42
[12.93922]→[12.93922:93976](∅→∅) − #[error("Change already on channel: {:?}", hash)]
replacement in libpijul/src/apply.rs at line 43
[12.94036]→[12.94036:94075](∅→∅),
[12.94075]→[12.94075:94094](∅→∅),
[12.94094]→[12.123101:123142](∅→∅) − #[error("Transaction error: {0}")]
− Txn(TxnError),
− #[error("Block error: {:?}", block)]
+ Txn(#[from] TxnErr<T::GraphError>),
+ Tree(#[from] TreeErr<T::TreeError>),
edit in libpijul/src/apply.rs at line 46
[12.123183]→[12.123183:123214](∅→∅) − #[error("Invalid change")]
replacement in libpijul/src/apply.rs at line 49
[12.17434]→[12.94266:94387](∅→∅),
[12.94266]→[12.94266:94387](∅→∅),
[12.94387]→[12.94387:94407](∅→∅),
[12.94407]→[12.94407:94468](∅→∅),
[12.94468]→[12.123234:123359](∅→∅) − impl<TxnError: std::error::Error> LocalApplyError<TxnError> {
− fn from_missing(err: MissingError<TxnError>) -> Self {
− match err {
− MissingError::Txn(e) => LocalApplyError::Txn(e),
− MissingError::Block(e) => e.into(),
− MissingError::Inconsistent(_) => LocalApplyError::InvalidChange,
+ impl<T: GraphTxnT + TreeTxnT> std::fmt::Debug for LocalApplyError<T> {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ LocalApplyError::DependencyMissing { hash } => {
+ write!(fmt, "Dependency missing: {:?}", hash)
+ }
+ LocalApplyError::ChangeAlreadyOnChannel { hash } => {
+ write!(fmt, "Change already on channel: {:?}", hash)
+ }
+ LocalApplyError::Txn(e) => std::fmt::Debug::fmt(e, fmt),
+ LocalApplyError::Tree(e) => std::fmt::Debug::fmt(e, fmt),
+ LocalApplyError::Block { block } => write!(fmt, "Block error: {:?}", block),
+ LocalApplyError::InvalidChange => write!(fmt, "Invalid change"),
replacement in libpijul/src/apply.rs at line 66
[12.123378]→[12.123378:123542](∅→∅),
[12.123542]→[12.123542:123562](∅→∅),
[12.123562]→[12.123562:123629](∅→∅),
[12.123629]→[12.123629:123678](∅→∅) − impl<T: std::error::Error> From<crate::pristine::InconsistentChange<T>> for LocalApplyError<T> {
− fn from(err: crate::pristine::InconsistentChange<T>) -> Self {
− match err {
− InconsistentChange::Txn(e) => LocalApplyError::Txn(e),
− _ => LocalApplyError::InvalidChange,
+ impl<T: GraphTxnT + TreeTxnT> std::fmt::Display for LocalApplyError<T> {
+ fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
+ match self {
+ LocalApplyError::DependencyMissing { hash } => {
+ write!(fmt, "Dependency missing: {:?}", hash)
+ }
+ LocalApplyError::ChangeAlreadyOnChannel { hash } => {
+ write!(fmt, "Change already on channel: {:?}", hash)
+ }
+ LocalApplyError::Txn(e) => std::fmt::Display::fmt(e, fmt),
+ LocalApplyError::Tree(e) => std::fmt::Display::fmt(e, fmt),
+ LocalApplyError::Block { block } => write!(fmt, "Block error: {:?}", block),
+ LocalApplyError::InvalidChange => write!(fmt, "Invalid change"),
replacement in libpijul/src/apply.rs at line 83
[12.123697]→[12.123697:123873](∅→∅) − impl<T: std::error::Error> From<crate::pristine::TxnErr<T>> for LocalApplyError<T> {
− fn from(err: crate::pristine::TxnErr<T>) -> Self {
− LocalApplyError::Txn(err.0)
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT> From<crate::pristine::TxnErr<T::GraphError>>
+ for ApplyError<C, T>
+ {
+ fn from(err: crate::pristine::TxnErr<T::GraphError>) -> Self {
+ ApplyError::LocalChange(LocalApplyError::Txn(err))
replacement in libpijul/src/apply.rs at line 91
[12.123882]→[12.123882:123964](∅→∅) − impl<C: std::error::Error, T: std::error::Error> From<crate::pristine::TxnErr<T>>
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT> From<crate::pristine::TreeErr<T::TreeError>>
replacement in libpijul/src/apply.rs at line 94
[12.123991]→[12.123991:124089](∅→∅) − fn from(err: crate::pristine::TxnErr<T>) -> Self {
− LocalApplyError::Txn(err.0).into()
+ fn from(err: crate::pristine::TreeErr<T::TreeError>) -> Self {
+ ApplyError::LocalChange(LocalApplyError::Tree(err))
replacement in libpijul/src/apply.rs at line 99
[12.124098]→[12.124098:124246](∅→∅) − impl<T: std::error::Error> From<crate::pristine::BlockError<T>> for LocalApplyError<T> {
− fn from(err: crate::pristine::BlockError<T>) -> Self {
+ impl<T: GraphTxnT + TreeTxnT> LocalApplyError<T> {
+ fn from_missing(err: MissingError<T::GraphError>) -> Self {
replacement in libpijul/src/apply.rs at line 102
[12.124266]→[12.124266:124325](∅→∅) − BlockError::Txn(e) => LocalApplyError::Txn(e),
+ MissingError::Txn(e) => LocalApplyError::Txn(TxnErr(e)),
+ MissingError::Block(e) => e.into(),
+ MissingError::Inconsistent(_) => LocalApplyError::InvalidChange,
+ }
+ }
+ }
+
+ impl<T: GraphTxnT + TreeTxnT> From<crate::pristine::InconsistentChange<T::GraphError>>
+ for LocalApplyError<T>
+ {
+ fn from(err: crate::pristine::InconsistentChange<T::GraphError>) -> Self {
+ match err {
+ InconsistentChange::Txn(e) => LocalApplyError::Txn(TxnErr(e)),
+ _ => LocalApplyError::InvalidChange,
+ }
+ }
+ }
+
+ impl<T: GraphTxnT + TreeTxnT> From<crate::pristine::BlockError<T::GraphError>>
+ for LocalApplyError<T>
+ {
+ fn from(err: crate::pristine::BlockError<T::GraphError>) -> Self {
+ match err {
+ BlockError::Txn(e) => LocalApplyError::Txn(TxnErr(e)),
edit in libpijul/src/apply.rs at line 131
+ impl<C: std::error::Error, T: GraphTxnT + TreeTxnT> From<crate::pristine::BlockError<T::GraphError>>
+ for ApplyError<C, T>
+ {
+ fn from(err: crate::pristine::BlockError<T::GraphError>) -> Self {
+ ApplyError::LocalChange(LocalApplyError::from(err))
+ }
+ }
+
replacement in libpijul/src/apply.rs at line 149
[12.944880]→[12.124403:124469](∅→∅) − ) -> Result<(u64, Merkle), ApplyError<P::Error, T::GraphError>> {
+ ) -> Result<(u64, Merkle), ApplyError<P::Error, T>> {
replacement in libpijul/src/apply.rs at line 163
[12.945379]→[12.143355:143436](∅→∅) − return Err((LocalApplyError::DependencyMissing { hash: *hash }).into());
+ return Err(ApplyError::LocalChange(
+ LocalApplyError::DependencyMissing { hash: *hash },
+ ));
replacement in libpijul/src/apply.rs at line 176
[12.945713]→[12.94941:94973](∅→∅),
[12.94973]→[12.4296:4355](∅→∅),
[12.4355]→[12.95077:95085](∅→∅),
[12.95077]→[12.95077:95085](∅→∅) − Ok(apply_change_to_channel(
− txn, channel, internal, &hash, &change, workspace,
− )?)
+ Ok(
+ apply_change_to_channel(txn, channel, internal, &hash, &change, workspace)
+ .map_err(ApplyError::LocalChange)?,
+ )
replacement in libpijul/src/apply.rs at line 189
[12.946111]→[12.124780:124835](∅→∅) − ) -> Result<(), ApplyError<P::Error, T::GraphError>> {
+ ) -> Result<(), ApplyError<P::Error, T>> {
replacement in libpijul/src/apply.rs at line 233
[12.947384]→[12.6246:6339](∅→∅) − apply_change_to_channel(txn, channel, internal, &hash, &change, workspace)?;
+ apply_change_to_channel(txn, channel, internal, &hash, &change, workspace)
+ .map_err(ApplyError::LocalChange)?;
replacement in libpijul/src/apply.rs at line 247
[12.144002]→[12.125335:125401](∅→∅),
[12.947938]→[12.125335:125401](∅→∅) − ) -> Result<(u64, Merkle), ApplyError<P::Error, T::GraphError>> {
+ ) -> Result<(u64, Merkle), ApplyError<P::Error, T>> {
replacement in libpijul/src/apply.rs at line 257
[12.105988]→[12.105988:106054](∅→∅) − ) -> Result<(u64, Merkle), ApplyError<P::Error, T::GraphError>> {
+ ) -> Result<(u64, Merkle), ApplyError<P::Error, T>> {
replacement in libpijul/src/apply.rs at line 274
[12.948278]→[12.125402:125457](∅→∅) − ) -> Result<(), ApplyError<P::Error, T::GraphError>> {
+ ) -> Result<(), ApplyError<P::Error, T>> {
replacement in libpijul/src/apply.rs at line 285
[12.948456]→[12.125458:125505](∅→∅) − fn apply_change_to_channel<T: ChannelMutTxnT>(
+ fn apply_change_to_channel<T: ChannelMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply.rs at line 292
[12.948861]→[12.125506:125567](∅→∅) − ) -> Result<(u64, Merkle), LocalApplyError<T::GraphError>> {
+ ) -> Result<(u64, Merkle), LocalApplyError<T>> {
replacement in libpijul/src/apply.rs at line 377
[12.126768]→[12.126768:126854](∅→∅),
[12.126854]→[12.126854:126919](∅→∅) − T: ChannelMutTxnT
− + DepsMutTxnT<DepsError = <T as GraphTxnT>::GraphError>
− + TreeMutTxnT<TreeError = <T as GraphTxnT>::GraphError>,
+ T: ChannelMutTxnT + DepsMutTxnT<DepsError = <T as GraphTxnT>::GraphError> + TreeMutTxnT,
replacement in libpijul/src/apply.rs at line 385
[12.952657]→[12.126923:126984](∅→∅) − ) -> Result<(u64, Merkle), LocalApplyError<T::GraphError>> {
+ ) -> Result<(u64, Merkle), LocalApplyError<T>> {
replacement in libpijul/src/apply.rs at line 413
[12.127315]→[12.127315:127401](∅→∅),
[12.127401]→[12.127401:127466](∅→∅) − T: ChannelMutTxnT
− + DepsMutTxnT<DepsError = <T as GraphTxnT>::GraphError>
− + TreeMutTxnT<TreeError = <T as GraphTxnT>::GraphError>,
+ T: ChannelMutTxnT + DepsMutTxnT<DepsError = <T as GraphTxnT>::GraphError> + TreeMutTxnT,
replacement in libpijul/src/apply.rs at line 420
[12.953616]→[12.127470:127531](∅→∅) − ) -> Result<(u64, Merkle), LocalApplyError<T::GraphError>> {
+ ) -> Result<(u64, Merkle), LocalApplyError<T>> {
replacement in libpijul/src/apply.rs at line 431
[12.5889]→[12.7939:8028](∅→∅),
[12.3408]→[12.7939:8028](∅→∅) − fn update_inode<T: ChannelTxnT + TreeMutTxnT<TreeError = <T as GraphTxnT>::GraphError>>(
+ fn update_inode<T: ChannelTxnT + TreeMutTxnT>(
replacement in libpijul/src/apply.rs at line 436
[12.953986]→[12.127645:127694](∅→∅) − ) -> Result<(), LocalApplyError<T::TreeError>> {
+ ) -> Result<(), LocalApplyError<T>> {
replacement in libpijul/src/apply.rs at line 509
[12.1058]→[12.132243:132303](∅→∅) − pub(crate) fn clean_obsolete_pseudo_edges<T: GraphMutTxnT>(
+ pub(crate) fn clean_obsolete_pseudo_edges<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply.rs at line 514
[12.20894]→[12.132333:132383](∅→∅) − ) -> Result<(), LocalApplyError<T::GraphError>> {
+ ) -> Result<(), LocalApplyError<T>> {
replacement in libpijul/src/apply.rs at line 576
[12.1060]→[12.132504:132549](∅→∅) − fn repair_missing_contexts<T: GraphMutTxnT>(
+ fn repair_missing_contexts<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply.rs at line 582
[12.974463]→[12.132579:132629](∅→∅) − ) -> Result<(), LocalApplyError<T::GraphError>> {
+ ) -> Result<(), LocalApplyError<T>> {
replacement in libpijul/src/apply.rs at line 609
[12.1062]→[12.132630:132680](∅→∅) − fn repair_new_vertex_context_up<T: GraphMutTxnT>(
+ fn repair_new_vertex_context_up<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply.rs at line 616
[12.22310]→[12.132710:132760](∅→∅) − ) -> Result<(), LocalApplyError<T::GraphError>> {
+ ) -> Result<(), LocalApplyError<T>> {
replacement in libpijul/src/apply.rs at line 636
[12.22912]→[12.132804:132856](∅→∅) − fn repair_new_vertex_context_down<T: GraphMutTxnT>(
+ fn repair_new_vertex_context_down<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply.rs at line 643
[12.23118]→[12.132886:132936](∅→∅) − ) -> Result<(), LocalApplyError<T::GraphError>> {
+ ) -> Result<(), LocalApplyError<T>> {
replacement in libpijul/src/apply.rs at line 676
[12.24008]→[12.133150:133191](∅→∅) − fn repair_edge_context<T: GraphMutTxnT>(
+ fn repair_edge_context<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply.rs at line 683
[12.24076]→[12.133221:133271](∅→∅) − ) -> Result<(), LocalApplyError<T::GraphError>> {
+ ) -> Result<(), LocalApplyError<T>> {
replacement in libpijul/src/apply.rs at line 707
[12.25019]→[12.133272:133324](∅→∅) − pub(crate) fn repair_cyclic_paths<T: GraphMutTxnT>(
+ pub(crate) fn repair_cyclic_paths<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply.rs at line 711
[12.25137]→[12.133354:133404](∅→∅) − ) -> Result<(), LocalApplyError<T::GraphError>> {
+ ) -> Result<(), LocalApplyError<T>> {
replacement in libpijul/src/apply.rs at line 737
[12.979487]→[12.133551:133584](∅→∅) − fn repair_edge<T: GraphMutTxnT>(
+ fn repair_edge<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply.rs at line 742
[12.979642]→[12.133614:133664](∅→∅) − ) -> Result<(), LocalApplyError<T::GraphError>> {
+ ) -> Result<(), LocalApplyError<T>> {
replacement in libpijul/src/apply.rs at line 813
[12.980815]→[12.134020:134048](∅→∅) − fn is_rooted<T: GraphTxnT>(
+ fn is_rooted<T: GraphTxnT + TreeTxnT>(
replacement in libpijul/src/apply.rs at line 818
[12.980926]→[12.134074:134126](∅→∅) − ) -> Result<bool, LocalApplyError<T::GraphError>> {
+ ) -> Result<bool, LocalApplyError<T>> {
replacement in libpijul/src/apply.rs at line 891
[12.621]→[12.621:701](∅→∅) − ) -> Result<Option<(Hash, u64, Merkle)>, ApplyError<P::Error, T::GraphError>> {
+ ) -> Result<Option<(Hash, u64, Merkle)>, ApplyError<P::Error, T>> {
replacement in libpijul/src/apply.rs at line 904
− let v = txn
− .find_block(gr, v?.dest())
− .map_err(LocalApplyError::from)?;
+ let v = txn.find_block(gr, v?.dest())?;
replacement in libpijul/src/apply/vertex.rs at line 6
[12.90614]→[12.90614:90653](∅→∅) − pub fn put_newvertex<T: GraphMutTxnT>(
+ pub fn put_newvertex<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply/vertex.rs at line 13
[12.90792]→[12.90792:90842](∅→∅) − ) -> Result<(), LocalApplyError<T::GraphError>> {
+ ) -> Result<(), LocalApplyError<T>> {
replacement in libpijul/src/apply/vertex.rs at line 73
[12.92874]→[12.92874:92910](∅→∅) − fn put_up_context<T: GraphMutTxnT>(
+ fn put_up_context<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply/vertex.rs at line 79
[12.93022]→[12.93022:93074](∅→∅) − ) -> Result<bool, LocalApplyError<T::GraphError>> {
+ ) -> Result<bool, LocalApplyError<T>> {
replacement in libpijul/src/apply/vertex.rs at line 122
[12.94588]→[12.94588:94626](∅→∅) − fn put_down_context<T: GraphMutTxnT>(
+ fn put_down_context<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply/vertex.rs at line 128
[12.94740]→[12.94740:94792](∅→∅) − ) -> Result<bool, LocalApplyError<T::GraphError>> {
+ ) -> Result<bool, LocalApplyError<T>> {
replacement in libpijul/src/apply/edge.rs at line 15
[12.96505]→[12.1356:1404](∅→∅) − ) -> Result<(), LocalApplyError<T::GraphError>>
+ ) -> Result<(), LocalApplyError<T>>
replacement in libpijul/src/apply/edge.rs at line 17
[12.96530]→[12.96530:96551](∅→∅) + T: GraphMutTxnT + TreeTxnT,
replacement in libpijul/src/apply/edge.rs at line 105
[12.99461]→[12.1590:1638](∅→∅) − ) -> Result<(), LocalApplyError<T::GraphError>>
+ ) -> Result<(), LocalApplyError<T>>
replacement in libpijul/src/apply/edge.rs at line 107
[12.99486]→[12.99486:99507](∅→∅) + T: GraphMutTxnT + TreeTxnT,
replacement in libpijul/src/apply/edge.rs at line 133
[12.100307]→[12.100307:100340](∅→∅) − fn check_valid<T: GraphMutTxnT>(
+ fn check_valid<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply/edge.rs at line 139
[12.100480]→[12.100480:100530](∅→∅) − ) -> Result<(), LocalApplyError<T::GraphError>> {
+ ) -> Result<(), LocalApplyError<T>> {
replacement in libpijul/src/apply/edge.rs at line 156
[12.100992]→[12.1639:1690](∅→∅) − pub(crate) fn find_source_vertex<T: GraphMutTxnT>(
+ pub(crate) fn find_source_vertex<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply/edge.rs at line 164
[12.101221]→[12.101221:101285](∅→∅) − ) -> Result<Vertex<ChangeId>, LocalApplyError<T::GraphError>> {
+ ) -> Result<Vertex<ChangeId>, LocalApplyError<T>> {
replacement in libpijul/src/apply/edge.rs at line 177
[12.101745]→[12.1691:1742](∅→∅) − pub(crate) fn find_target_vertex<T: GraphMutTxnT>(
+ pub(crate) fn find_target_vertex<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply/edge.rs at line 185
[12.101970]→[12.101970:102034](∅→∅) − ) -> Result<Vertex<ChangeId>, LocalApplyError<T::GraphError>> {
+ ) -> Result<Vertex<ChangeId>, LocalApplyError<T>> {
replacement in libpijul/src/apply/edge.rs at line 199
[12.102516]→[12.102516:102558](∅→∅) − fn collect_pseudo_edges<T: GraphMutTxnT>(
+ fn collect_pseudo_edges<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply/edge.rs at line 205
[12.102697]→[12.102697:102747](∅→∅) − ) -> Result<(), LocalApplyError<T::GraphError>> {
+ ) -> Result<(), LocalApplyError<T>> {
replacement in libpijul/src/apply/edge.rs at line 238
[12.103722]→[12.103722:103766](∅→∅) − fn reconnect_pseudo_edges<T: GraphMutTxnT>(
+ fn reconnect_pseudo_edges<T: GraphMutTxnT + TreeTxnT>(
replacement in libpijul/src/apply/edge.rs at line 244
[12.103907]→[12.103907:103957](∅→∅) − ) -> Result<(), LocalApplyError<T::GraphError>> {
+ ) -> Result<(), LocalApplyError<T>> {
replacement in libpijul/src/alive/retrieve.rs at line 120
[12.135533]→[12.988093:988137](∅→∅),
[12.988093]→[12.988093:988137](∅→∅),
[12.988137]→[12.148676:148743](∅→∅),
[12.67154]→[12.988202:988306](∅→∅),
[12.74065]→[12.988202:988306](∅→∅),
[12.135616]→[12.988202:988306](∅→∅),
[12.148743]→[12.988202:988306](∅→∅),
[12.988202]→[12.988202:988306](∅→∅),
[12.988306]→[12.22079:22145](∅→∅),
[12.22145]→[12.22145:22190](∅→∅),
[12.22190]→[12.22190:22208](∅→∅),
[12.22208]→[12.22208:22242](∅→∅),
[12.22242]→[12.22242:22254](∅→∅) − for &(vertex, edge) in forward.iter() {
− let dest = *txn.find_block(channel, edge.dest()).unwrap();
− debug!(target:"libpijul::forward", "deleting forward edge {:?} {:?} {:?}", vertex, dest, edge);
− del_graph_with_rev(
− txn,
− channel,
− edge.flag(),
− vertex,
− dest,
− edge.introduced_by(),
− )?;
+ for ve in forward.iter() {
+ let dest = *txn.find_block(channel, ve.e.dest()).unwrap();
+ debug!(target:"libpijul::forward", "deleting forward edge {:?} {:?} {:?}", ve.v, dest, ve.e);
+ del_graph_with_rev(txn, channel, ve.e.flag(), ve.v, dest, ve.e.introduced_by())?;
replacement in libpijul/src/alive/output.rs at line 24
[12.989052]→[12.135687:135741](∅→∅) − ) -> Result<(), FileError<P::Error, T::GraphError>> {
+ ) -> Result<(), FileError<P::Error, T>> {
replacement in libpijul/src/alive/output.rs at line 191
[12.993081]→[12.137317:137371](∅→∅) − ) -> Result<(), FileError<P::Error, T::GraphError>> {
+ ) -> Result<(), FileError<P::Error, T>> {
replacement in libpijul/src/alive/output.rs at line 246
[12.994445]→[12.149218:149277](∅→∅),
[12.149277]→[12.137521:137590](∅→∅),
[12.994494]→[12.137521:137590](∅→∅) − forward: &mut Vec<(Vertex<ChangeId>, SerializedEdge)>,
− ) -> Result<(), crate::output::FileError<P::Error, T::GraphError>> {
+ forward: &mut Vec<super::Redundant>,
+ ) -> Result<(), crate::output::FileError<P::Error, T>> {
edit in libpijul/src/alive/mod.rs at line 24
+ pub struct Redundant {
+ pub(crate) v: Vertex<ChangeId>,
+ pub(crate) e: SerializedEdge,
+ }
+
replacement in libpijul/src/alive/dfs.rs at line 369
[12.1013332]→[12.149918:149981](∅→∅) − forward: &mut Vec<(Vertex<ChangeId>, SerializedEdge)>,
+ forward: &mut Vec<super::Redundant>,
replacement in libpijul/src/alive/dfs.rs at line 391
[12.1014350]→[12.1014350:1014421](∅→∅) − forward.push((self[*cousin].vertex, edge))
+ forward.push(super::Redundant {
+ v: self[*cousin].vertex,
+ e: edge,
+ })
edit in libpijul/Cargo.toml at line 62
replacement in Cargo.lock at line 273
[12.3116]→[12.1732:1757](∅→∅) − version = "3.0.0-beta.5"
replacement in Cargo.lock at line 275
[12.3206]→[12.1758:1836](∅→∅) − checksum = "feff3878564edb93745d58cf63e17b63f24142506e7a20c87a5521ed7bfb1d63"
+ checksum = "79b70f999da60e6619a29b131739d2211ed4d4301f40372e94a8081422e9d6c7"
edit in Cargo.lock at line 286
[12.3423]→[12.1837:1849](∅→∅) replacement in Cargo.lock at line 290
[12.3489]→[12.1850:1875](∅→∅) − version = "3.0.0-beta.5"
replacement in Cargo.lock at line 292
[12.3579]→[12.1876:1954](∅→∅) − checksum = "8b15c6b4f786ffb6192ffe65a36855bc1fc2444bcd0945ae16748dcd6ed7d0d3"
+ checksum = "fe8c0f28022faaef0387fa54f8e33fee22b804a88bbd91303197da2ff8ca6a5d"
replacement in Cargo.lock at line 1405
[12.30867]→[12.1955:1973](∅→∅) replacement in Cargo.lock at line 1407
[12.30950]→[12.1974:2052](∅→∅) − checksum = "addaa943333a514159c80c97ff4a93306530d965d27e139188283cd13e06a799"
+ checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
edit in Cargo.lock at line 2102
[12.5819]→[12.48295:48332](∅→∅),
[12.48295]→[12.48295:48332](∅→∅) − dependencies = [
− "unicode-width",
− ]
edit in Cargo.lock at line 2373
[12.2323]→[12.2323:2538](∅→∅),
[12.2538]→[12.54292:54305](∅→∅),
[12.54292]→[12.54292:54305](∅→∅) − name = "unicase"
− version = "2.6.0"
− source = "registry+https://github.com/rust-lang/crates.io-index"
− checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6"
− dependencies = [
− "version_check",
− ]
−
− [[package]]
edit in Cargo.lock at line 2394
[12.54973]→[12.54973:54996](∅→∅),
[12.54996]→[12.9304:9322](∅→∅),
[12.9322]→[12.55014:55079](∅→∅),
[12.55014]→[12.55014:55079](∅→∅),
[12.55079]→[12.9323:9401](∅→∅),
[12.9401]→[12.55157:55170](∅→∅),
[12.55157]→[12.55157:55170](∅→∅) − name = "unicode-width"
− version = "0.1.9"
− source = "registry+https://github.com/rust-lang/crates.io-index"
− checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
−
− [[package]]