stablerange: stop using '.node' in subrangesclosure
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 06:02:45 +0100
changeset 2142 7dc66a526b21
parent 2141 647e222cd4ab
child 2143 99cf2784e2a6
stablerange: stop using '.node' in subrangesclosure We access the range-head revision number by index and convert it on site.
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Wed Mar 22 05:15:49 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 06:02:45 2017 +0100
@@ -144,7 +144,8 @@
                 ranges.add(r)
                 toproceed.append(r)
     ranges = list(ranges)
-    ranges.sort(key=lambda r: (-len(r), r.node))
+    n = repo.changelog.node
+    ranges.sort(key=lambda r: (-len(r), n(r[0])))
     return ranges
 
 class stablerangecache(dict):