changeset 50863 | 264072107105 |
parent 50724 | a10d823a8e3d |
child 51120 | 532e74ad3ff6 |
--- a/rust/hg-core/src/dirstate_tree/dirstate_map.rs Wed Aug 02 10:07:00 2023 -0400 +++ b/rust/hg-core/src/dirstate_tree/dirstate_map.rs Wed Aug 02 10:21:18 2023 -0400 @@ -579,6 +579,14 @@ } } + pub fn has_node( + &self, + path: &HgPath, + ) -> Result<bool, DirstateV2ParseError> { + let node = self.get_node(path)?; + Ok(node.is_some()) + } + /// Returns a mutable reference to the node at `path` if it exists /// /// `each_ancestor` is a callback that is called for each ancestor node