changeset 2153:7c5149a129d2

stablerange: stop using '.head' in '_slicesrangeat' We now access '[0]' as we'll do with the future tuple.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 22 Mar 2017 17:45:21 +0100
parents c00fb215cd80
children f02f63c26424
files hgext3rd/evolve/stablerange.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/stablerange.py	Wed Mar 22 17:44:10 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 17:45:21 2017 +0100
@@ -271,16 +271,16 @@
         return slicepoint
 
     def _slicesrangeat(self, repo, rangeid, globalindex):
-        p1, p2 = repo.changelog.parentrevs(rangeid.head)
+        p1, p2 = repo.changelog.parentrevs(rangeid[0])
         if p2 != nodemod.nullrev:
             return self._slicesrangeatmerge(repo, rangeid, globalindex)
         assert p1 != nodemod.nullrev
-        rangedepth = self.depthrev(repo, rangeid.head)
+        rangedepth = self.depthrev(repo, rangeid[0])
         topsize = rangedepth - globalindex
 
         parentrange = stablerange(repo, p1, rangeid.index, rangeid._revs[:-1])
         if topsize == 1:
-            top = stablerange(repo, rangeid.head, globalindex, [rangeid.head])
+            top = stablerange(repo, rangeid[0], globalindex, [rangeid[0]])
             return [parentrange, top]
         else:
             # XXX recursive call, python have issue with them
@@ -291,7 +291,7 @@
             # wait for that heavy object to be gone.
             parentsubranges = self.subranges(repo, parentrange)
             slices = parentsubranges[:-1] # pop the top
-            top = stablerange(repo, rangeid.head, globalindex, rangeid._revs[-topsize:])
+            top = stablerange(repo, rangeid[0], globalindex, rangeid._revs[-topsize:])
             slices.append(top)
             return slices
 
@@ -302,7 +302,7 @@
 
         result = []
         bottom = rangeid._revs[:localindex]
-        top = stablerange(repo, rangeid.head, globalindex, rangeid._revs[localindex:])
+        top = stablerange(repo, rangeid[0], globalindex, rangeid._revs[localindex:])
         #
         toprootdepth = repo.stablerange.depthrev(repo, top._revs[0])
         if toprootdepth + len(top) == rangeid.depth + 1: