changeset 2222:6b19998242ed

stablerange: fix merge slicing when range has multiple roots The first element in the bottom set is not necessarly the one with the lowest revision. We now properly compute and use the minimum value.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Fri, 24 Mar 2017 11:04:38 +0100
parents f61d091d318e
children 2ba541e1ea01
files hgext3rd/evolve/stablerange.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/stablerange.py	Fri Mar 24 09:04:34 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Fri Mar 24 11:04:38 2017 +0100
@@ -473,6 +473,7 @@
             bheads = set(bottomrevs)
             du = bheads.difference_update
             reachableroots = repo.changelog.reachableroots
+            minrev = min(bottomrevs)
             for r in bottomrevs:
                 du(parents(r, parentrevs))
             for h in bheads:
@@ -482,7 +483,7 @@
                 # "h" multiple time in a warming run. So using "ancestors" and
                 # caching that should be faster. But python code filtering on
                 # the ancestors end up being slower.
-                hrevs = reachableroots(bottomrevs[0], [h], bottomrevs, True)
+                hrevs = reachableroots(minrev, [h], bottomrevs, True)
                 start = self.depthrev(repo, h) - len(hrevs)
                 entry = (h, start)
                 result.append(entry)