stablesort: make the iteration from head available to all
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sun, 10 Dec 2017 03:31:28 +0100
changeset 3300 2d49773a378b
parent 3299 c089495d7701
child 3301 5c45df0c8e36
stablesort: make the iteration from head available to all This will be useful for the stablerange code to work properly.
hgext3rd/evolve/stablesort.py
--- a/hgext3rd/evolve/stablesort.py	Sun Dec 17 21:17:28 2017 +0100
+++ b/hgext3rd/evolve/stablesort.py	Sun Dec 10 03:31:28 2017 +0100
@@ -306,14 +306,14 @@
 
     def get(self, repo, rev, limit=None):
         result = []
-        for r in self._revsfrom(repo, rev):
+        for r in self.walkfrom(repo, rev):
             result.append(r)
             if limit is not None and limit <= len(result):
                 break
         result.reverse()
         return result
 
-    def _revsfrom(self, repo, head):
+    def walkfrom(self, repo, head):
         tiebreaker = _mergepoint_tie_breaker(repo)
         cl = repo.changelog
         parentsfunc = cl.parentrevs