Do not remove files not tracked in the new channel when outputting

pmeunier
Jul 21, 2021, 12:28 PM
GJZWSXHQ6SYUDTVDOUBTJYU3SG567M2AXWURWKRNVP2MISZ444DQC

Dependencies

  • [2] FXEDPLRI Resurrecting tests, and type cleanup (no need for Arc<RwLock<…>> anymore)
  • [3] VO5OQW4W Removing anyhow in libpijul
  • [4] CCLLB7OI Upgrading to Sanakirja 0.15 + version bump
  • [5] U4F5G3AU Do not delete unknown files during a reset
  • [6] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).
  • [7] YN63NUZO Sanakirja 1.0
  • [8] 5BRU2RRW Cleanup (debugging a crash related to trees/inodes)
  • [9] I24UEJQL Various post-fire fixes

Change contents

  • replacement in libpijul/src/output/output.rs at line 167
    [2.102191][2.102191:102257]()
    kill_dead_files::<T, R, P>(&mut *txn, &repo, &dead)?;
    [2.102191]
    [3.76962]
    kill_dead_files::<T, R, P>(&mut *txn, &channel, &repo, &dead)?;
  • replacement in libpijul/src/output/output.rs at line 287
    [2.102636][2.102636:102714]()
    kill_dead_files::<T, R, P>(&mut *txn, &repo, &dead)?;
    [2.102636]
    [3.78609]
    kill_dead_files::<T, R, P>(&mut *txn, &channel, &repo, &dead)?;
  • replacement in libpijul/src/output/output.rs at line 545
    [3.22808][2.103387:103463]()
    fn kill_dead_files<T: TreeMutTxnT, W: WorkingCopy + Clone, C: ChangeStore>(
    [3.22808]
    [3.685451]
    fn kill_dead_files<T: ChannelTxnT<GraphError = T::TreeError> + TreeMutTxnT, W: WorkingCopy + Clone, C: ChangeStore>(
  • edit in libpijul/src/output/output.rs at line 547
    [3.685468]
    [2.103464]
    channel: &ChannelRef<T>,
  • replacement in libpijul/src/output/output.rs at line 550
    [3.685544][3.85042:85107]()
    ) -> Result<(), OutputError<C::Error, T::TreeError, W::Error>> {
    [3.685544]
    [3.685577]
    ) -> Result<(), OutputError<C::Error, T::TreeError, W::Error>>
    {
    let channel = channel.read();
  • edit in libpijul/src/output/output.rs at line 557
    [3.121803][3.121803:121900]()
    for i in txn.iter_inodes().unwrap() {
    debug!("inodes = {:?}", i);
    }
  • replacement in libpijul/src/output/output.rs at line 560
    [3.122018][3.0:114](),[3.85288][3.0:114]()
    if let Some(name) = name {
    repo.remove_path(&name).map_err(OutputError::WorkingCopy)?
    [3.122018]
    [3.114]
    if txn.get_graph(txn.graph(&*channel), &vertex.inode_vertex(), None).map_err(|x| OutputError::Pristine(x.into()))?.is_some() {
    if let Some(name) = name {
    repo.remove_path(&name).map_err(OutputError::WorkingCopy)?
    }