stablerange: stop using '.index' in '_slicesrangeat'
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 17:55:57 +0100
changeset 2161 0a06f5cbca4b
parent 2160 66b774ed1335
child 2162 7967d0b86364
stablerange: stop using '.index' in '_slicesrangeat' 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:53:39 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 17:55:57 2017 +0100
@@ -278,7 +278,7 @@
         rangedepth = self.depthrev(repo, rangeid[0])
         topsize = rangedepth - globalindex
 
-        parentrange = stablerange(repo, p1, rangeid.index, rangeid._revs[:-1])
+        parentrange = stablerange(repo, p1, rangeid[1], rangeid._revs[:-1])
         if topsize == 1:
             top = stablerange(repo, rangeid[0], globalindex, [rangeid[0]])
             return [parentrange, top]
@@ -297,7 +297,7 @@
 
     @staticmethod
     def _slicesrangeatmerge(repo, rangeid, globalindex):
-        localindex = globalindex - rangeid.index
+        localindex = globalindex - rangeid[1]
         cl = repo.changelog
 
         result = []