diff -r 2e949ede7350 -r d5121df04808 mercurial/context.py --- a/mercurial/context.py Fri Jan 28 11:33:01 2022 +0100 +++ b/mercurial/context.py Fri Jan 28 11:35:41 2022 +0100 @@ -684,6 +684,14 @@ """Return a list of byte bookmark names.""" return self._repo.nodebookmarks(self._node) + def fast_rank(self): + repo = self._repo + if self._maybe_filtered: + cl = repo.changelog + else: + cl = repo.unfiltered().changelog + return cl.fast_rank(self._rev) + def phase(self): return self._repo._phasecache.phase(self._repo, self._rev)