stablerange: use rangelength in '_slicepoint'
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 18:40:19 +0100
changeset 2168 3012d4ddfb23
parent 2167 d37f0423c072
child 2169 03baabcd1b9e
stablerange: use rangelength in '_slicepoint' We stop using the building '__len__' this get use closer to be able to use a tuple.
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Wed Mar 22 18:39:47 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 18:40:19 2017 +0100
@@ -264,7 +264,7 @@
                 standard_start += step
             step //= 2
         if rangeid[1] == standard_start:
-            slicesize = _hlp2(len(rangeid))
+            slicesize = _hlp2(self.rangelength(repo, rangeid))
             slicepoint = rangeid[1] + slicesize
         else:
             assert standard_start < rangedepth