5BRU2RRWOQBMS2V3RQM7PRFR5UILYZ73GISHAKJA6KIZGC5M2MFAC
OCBM7IFE7CL3PM5KPYTRTKTHYKC76NTFK5C4VA4JFAKQUA6GC7FAC
R3H7D42UZ446V5TO2574BMAQQAYYJPEIMSZVDPAGVIYU2COJSWBAC
L4JXJHWXYNCL4QGJXNKKTOKKTAXKKXBJUUY7HFZGEUZ5A2V5H34QC
SXEYMYF7P4RZMZ46WPL4IZUTSQ2ATBWYZX7QNVMS3SGOYXYOHAGQC
I52XSRUH5RVHQBFWVMAQPTUSPAJ4KNVID2RMI3UGCVKFLYUO6WZAC
7UPL3Y2A5QOBU6VIUHNWEFGSGQ5CMWGDGOVLRZ53UARXG3TDGLMAC
Ok(())
}
pub(crate) fn del_inodes_with_rev<T: MutTxnT>(
txn: &mut T,
inode: Inode,
position: Position<ChangeId>,
) -> Result<bool, anyhow::Error> {
if txn.del_inodes(inode, Some(position))? {
assert!(txn.del_revinodes(position, Some(inode))?);
Ok(true)
} else {
Ok(false)
}
}
pub(crate) fn put_tree_with_rev<T: MutTxnT>(
txn: &mut T,
file_id: PathId,
inode: Inode,
) -> Result<(), anyhow::Error> {
txn.put_tree(file_id, inode)?;
txn.put_revtree(inode, file_id)?;
// org id pbMhYNkbwXVN5IhA6QR+oGisezusrYj/GXR0zMRLtTU=
assert!(txn.del_tree(fileref.as_file_id(), Some(inode))?);
assert!(txn.del_revtree(inode, Some(fileref.as_file_id()))?);
// org id yM7YkGaAlCc1HX7iY/8kRuL9f2moGbKyzXKA/sGOdlM=
del_tree_with_rev(txn, fileref.as_file_id(), inode)?;
if txn.del_tree(parent.as_file_id(), Some(inode))? {
assert!(txn.del_revtree(inode, Some(parent.as_file_id()))?);
if update_inodes {
if let Some(vertex) = txn.get_inodes(inode, None) {
assert!(txn.del_revinodes(vertex, Some(inode))?);
assert!(txn.del_inodes(inode, Some(vertex))?);
}
if del_tree_with_rev(txn, parent.as_file_id(), inode)? {
if let Some(vertex) = txn.get_inodes(inode, None) {
del_inodes_with_rev(txn, inode, vertex)?;