Mercurial > evolve
changeset 2167:d37f0423c072
stablerange: use rangelength in subrangesclosure
We stop using the building '__len__' this get use closer to be able to use a
tuple.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Wed, 22 Mar 2017 18:39:47 +0100 |
parents | d4ff8708eb66 |
children | 3012d4ddfb23 |
files | hgext3rd/evolve/stablerange.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/stablerange.py Wed Mar 22 18:37:11 2017 +0100 +++ b/hgext3rd/evolve/stablerange.py Wed Mar 22 18:39:47 2017 +0100 @@ -145,7 +145,8 @@ toproceed.append(r) ranges = list(ranges) n = repo.changelog.node - ranges.sort(key=lambda r: (-len(r), n(r[0]))) + rangelength = repo.stablerange.rangelength + ranges.sort(key=lambda r: (-rangelength(repo, r), n(r[0]))) return ranges class stablerangecache(dict):