diff --git a/rust/hg-core/src/repo.rs b/rust/hg-core/src/repo.rs --- a/rust/hg-core/src/repo.rs +++ b/rust/hg-core/src/repo.rs @@ -797,6 +797,12 @@ impl Repo { )?, }) } + + pub fn node(&self, rev: UncheckedRevision) -> Option { + self.changelog() + .ok() + .and_then(|c| c.node_from_rev(rev).copied()) + } } /// Lazily-initialized component of `Repo` with interior mutability