stablerange: stop using '.index' in '_slicepoint'
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 17:53:39 +0100
changeset 2160 66b774ed1335
parent 2159 9b052257c743
child 2161 0a06f5cbca4b
stablerange: stop using '.index' in '_slicepoint' We now access '[1]' as we'll do with the future tuple.
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Wed Mar 22 17:52:53 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 17:53:39 2017 +0100
@@ -258,13 +258,13 @@
         rangedepth = self.depthrev(repo, rangeid[0])
         step = _hlp2(rangedepth)
         standard_start = 0
-        while standard_start < rangeid.index and 0 < step:
+        while standard_start < rangeid[1] and 0 < step:
             if standard_start + step < rangedepth:
                 standard_start += step
             step //= 2
-        if rangeid.index == standard_start:
+        if rangeid[1] == standard_start:
             slicesize = _hlp2(len(rangeid))
-            slicepoint = rangeid.index + slicesize
+            slicepoint = rangeid[1] + slicesize
         else:
             assert standard_start < rangedepth
             slicepoint = standard_start