mercurial/revlog.py
changeset 51975 609700e5d8df
parent 51973 42a116f1cdc1
child 52060 61557734c0ae
--- a/mercurial/revlog.py	Thu Sep 26 01:52:09 2024 +0200
+++ b/mercurial/revlog.py	Fri Sep 27 03:55:40 2024 +0200
@@ -2382,12 +2382,7 @@
 
     def headrevs(self, revs=None, stop_rev=None):
         if revs is None:
-            excluded = None
-            if stop_rev is not None and stop_rev < len(self.index):
-                # We should let the native code handle it, but that a
-                # simple enough first step.
-                excluded = range(stop_rev, len(self.index))
-            return self.index.headrevs(excluded)
+            return self.index.headrevs(None, stop_rev)
         assert stop_rev is None
         if rustdagop is not None and self.index.rust_ext_compat:
             return rustdagop.headrevs(self.index, revs)