# HG changeset patch # User Pierre-Yves David # Date 1490349878 -3600 # Node ID 6b19998242ed74565dd9459200c2fc6edd9d7fb4 # Parent f61d091d318e1642927c118e64b42b74e6b28c70 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. diff -r f61d091d318e -r 6b19998242ed hgext3rd/evolve/stablerange.py --- 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)