mercurial/context.py
changeset 48762 d5121df04808
parent 48673 576040155dba
child 48875 6000f5b25c9b
--- 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)