Now you can `pijul remove` the root of a repository

[?]
Dec 6, 2020, 2:34 PM
7T5STZYBIUN5AQPFKASNYO24QFLNBX3YCE4YIIXEQNJYR5LSZ6EQC

Dependencies

  • [2] VO5OQW4W Removing anyhow in libpijul
  • [3] WZVCLZKY address clippy lints
  • [4] 6T5ULULM Fixing conflicts with the changes from discussion #143
  • [5] LCERQSWM Cleanup
  • [6] 5BRU2RRW Cleanup (debugging a crash related to trees/inodes)
  • [7] SXEYMYF7 Fixing the bad changes in history (unfortunately, by rebooting).

Change contents

  • replacement in libpijul/src/fs.rs at line 298
    [3.67][2.31680:31795]()
    assert!(txn
    .del_tree(file_id.as_file_id(), Some(inode))
    .map_err(FsError::Txn)?);
    [3.67]
    [3.748177]
    assert!(
    inode.is_root()
    || txn
    .del_tree(file_id.as_file_id(), Some(inode))
    .map_err(FsError::Txn)?
    );
  • replacement in libpijul/src/fs.rs at line 305
    [3.748183][2.31796:31879]()
    if del_tree_with_rev(txn, parent.as_file_id(), inode).map_err(FsError::Txn)? {
    [3.748183]
    [3.3292]
    if !inode.is_root()
    && del_tree_with_rev(txn, parent.as_file_id(), inode).map_err(FsError::Txn)?
    {
  • replacement in libpijul/src/fs.rs at line 325
    [3.748918][3.748918:748985]()
    let parent = txn.get_revtree(inode, None).unwrap().to_owned();
    [3.748918]
    [3.748985]
    let parent = if inode.is_root() {
    OwnedPathId {
    parent_inode: Inode::ROOT,
    basename: SmallString::new(),
    }
    } else {
    txn.get_revtree(inode, None).unwrap().to_owned()
    };