gracinet updated this revision to Diff 19629. REPOSITORY rHG Mercurial
CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7789?vs=19038&id=19629 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7789/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7789 AFFECTED FILES rust/hg-core/src/revlog.rs CHANGE DETAILS diff --git a/rust/hg-core/src/revlog.rs b/rust/hg-core/src/revlog.rs --- a/rust/hg-core/src/revlog.rs +++ b/rust/hg-core/src/revlog.rs @@ -40,3 +40,17 @@ ParentOutOfRange(Revision), WorkingDirectoryUnsupported, } + +/// The Mercurial Revlog Index +/// +/// This is currently limited to the minimal interface that is needed for +/// the [`nodemap`](nodemap/index.html) module +pub trait RevlogIndex { + /// Total number of Revisions referenced in this index + fn len(&self) -> usize; + + /// Return a reference to the Node or `None` if rev is out of bounds + /// + /// `NULL_REVISION` is not considered to be out of bounds. + fn node(&self, rev: Revision) -> Option<&Node>; +} To: gracinet, #hg-reviewers, martinvonz Cc: martinvonz, durin42, kevincox, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel