stablerange: use rangelength in _obshashrange
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 18:37:11 +0100
changeset 2166 d4ff8708eb66
parent 2165 e97e9b0c9711
child 2167 d37f0423c072
stablerange: use rangelength in _obshashrange We stop using the building '__len__' this get use closer to be able to use a tuple.
hgext3rd/evolve/obsdiscovery.py
--- a/hgext3rd/evolve/obsdiscovery.py	Wed Mar 22 18:36:37 2017 +0100
+++ b/hgext3rd/evolve/obsdiscovery.py	Wed Mar 22 18:37:11 2017 +0100
@@ -419,7 +419,7 @@
         return obshash
     pieces = []
     nullid = node.nullid
-    if len(rangeid) == 1:
+    if repo.stablerange.rangelength(repo, rangeid) == 1:
         rangenode = cl.node(rangeid[0])
         tmarkers = repo.obsstore.relevantmarkers([rangenode])
         pieces = []