stablerange: drop the basic inheritance from the 'mergepoint' version
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 10 Dec 2017 03:58:22 +0100
changeset 3303 318c938be80d
parent 3302 f890d27df766
child 3304 d942fc5847f9
stablerange: drop the basic inheritance from the 'mergepoint' version All necessary bits are implemented now (except for warmup which we explicitly bypass for now).
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Sun Dec 10 12:12:12 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Sun Dec 10 03:58:22 2017 +0100
@@ -331,7 +331,7 @@
         This mostly exist to help the on disk persistence."""
         self._subrangescache[rev] = value
 
-class stablerange_mergepoint(stablerangecached, stablerangebasic):
+class stablerange_mergepoint(stablerangecached):
     """Stablerange implementation using 'mergepoint' based sorting
     """
 
@@ -339,8 +339,9 @@
         self._sortcache = stablesort.stablesortcache()
         super(stablerange_mergepoint, self).__init__()
 
-    def _sortfunction(self, repo, headrev):
-        return self._sortcache.get(repo, headrev)
+    def warmup(self, repo, upto=None):
+        # no cache to warm for basic implementation
+        pass
 
     def revsfromrange(self, repo, rangeid):
         """return revision contained in a range