changeset 2146:4df68eb96adf

stablerange: stop using '.node' in _queryrange We access the range-head revision number by index and convert it on site.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 22 Mar 2017 06:05:44 +0100
parents 4c0c88e51018
children 5179668d9f47
files hgext3rd/evolve/obsdiscovery.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/obsdiscovery.py	Wed Mar 22 06:05:32 2017 +0100
+++ b/hgext3rd/evolve/obsdiscovery.py	Wed Mar 22 06:05:44 2017 +0100
@@ -322,10 +322,12 @@
 
 def _queryrange(ui, repo, remote, allentries):
     mapping = {}
+    n = repo.changelog.node
+    nodeentries = [(n(entry[0]), entry.index, entry) for entry in allentries]
 
     def gen():
-        for entry in allentries:
-            key = entry.node + _pack('>I', entry.index)
+        for enode, eindex, entry in nodeentries:
+            key = enode + _pack('>I', eindex)
             mapping[key] = entry
             yield key