stablerange: stop using '.node' in obshashrange
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 06:03:57 +0100
changeset 2143 99cf2784e2a6
parent 2142 7dc66a526b21
child 2144 2200f67e1628
stablerange: stop using '.node' in obshashrange We access the range-head revision number by index and convert it on site.
hgext3rd/evolve/obsdiscovery.py
--- a/hgext3rd/evolve/obsdiscovery.py	Wed Mar 22 06:02:45 2017 +0100
+++ b/hgext3rd/evolve/obsdiscovery.py	Wed Mar 22 06:03:57 2017 +0100
@@ -407,13 +407,15 @@
 def _obshashrange(repo, rangeid):
     """return the obsolete hash associated to a range"""
     cache = repo.obsstore.rangeobshashcache
+    cl = repo.changelog
     obshash = cache.get(rangeid)
     if obshash is not None:
         return obshash
     pieces = []
     nullid = node.nullid
     if len(rangeid) == 1:
-        tmarkers = repo.obsstore.relevantmarkers([rangeid.node])
+        rangenode = cl.node(rangeid[0])
+        tmarkers = repo.obsstore.relevantmarkers([rangenode])
         pieces = []
         for m in tmarkers:
             mbin = obsolete._fm1encodeonemarker(m)