changeset 17674:e69274f8d444

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.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Mon, 03 Sep 2012 14:19:45 +0200
parents d686c6876ef6
children 8575f4a2126e
files mercurial/revlog.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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]