changeset 3323:4a84947010a1

stablesort: expose the jumps sequence to other code The stable range needs it to build exclusive subrange efficiently.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 10 Dec 2017 02:46:05 +0100
parents 20b6dae466a7
children 6ba8eaffe8f6
files hgext3rd/evolve/stablesort.py
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/stablesort.py	Wed Dec 20 16:20:26 2017 +0100
+++ b/hgext3rd/evolve/stablesort.py	Sun Dec 10 02:46:05 2017 +0100
@@ -329,6 +329,12 @@
         result.reverse()
         return result
 
+    def getjumps(self, repo, rev):
+        if self._jumps[rev] is None:
+            # still won't load anything if rev is not a merge
+            self.get(repo, rev) # we can be smarter here
+        return self._jumps[rev]
+
     def walkfrom(self, repo, head):
         tiebreaker = _mergepoint_tie_breaker(repo)
         cl = repo.changelog