clfilter: split `revlog.headrevs` C call from python code
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 03 Sep 2012 14:19:45 +0200
changeset 17674 e69274f8d444
parent 17673 d686c6876ef6
child 17675 8575f4a2126e
clfilter: split `revlog.headrevs` C call from python code Make the pure python implementation of headrevs available to derived classes. It is important because filtering logic applied by `revlog` derived class won't have effect on `index`. We want to be able to bypass this C call to implement our own.
mercurial/revlog.py
--- a/mercurial/revlog.py	Mon Sep 03 14:12:45 2012 +0200
+++ b/mercurial/revlog.py	Mon Sep 03 14:19:45 2012 +0200
@@ -607,7 +607,9 @@
         try:
             return self.index.headrevs()
         except AttributeError:
-            pass
+            return self._headrevs()
+
+    def _headrevs(self):
         count = len(self)
         if not count:
             return [nullrev]