MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / iter_rev_tree

Method iter_rev_tree

atomic-core/src/pristine/txn/read.rs:62–70  ·  view source on GitHub ↗

Enumerate every `(inode, path)` pair in `REV_TREE`. Unlike [`TreeTxnT::iter_tree`], which walks the single-valued `path -> inode` `TREE` index (so it hides every inode a later same-path create overwrote), this walks the inode-keyed `REV_TREE` and therefore exposes ALL inodes that ever claimed a path. Callers use it to detect name conflicts: a path with two distinct inodes that are both visible an

(&self)

Source from the content-addressed store, hash-verified

60 /// use it to detect name conflicts: a path with two distinct inodes that
61 /// are both visible and alive under a view's change filter.
62 pub fn iter_rev_tree(&self) -> PristineResult<Vec<(Inode, String)>> {
63 let table = self.txn.open_table(REV_TREE)?;
64 let mut results = Vec::new();
65 for entry in table.iter()? {
66 let (k, v) = entry?;
67 results.push((Inode::new(k.value()), v.value().to_string()));
68 }
69 Ok(results)
70 }
71}
72
73// GraphTxnT Implementation

Callers 1

materialize_parallelMethod · 0.80

Calls 2

iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected