stablerange: make sure nobody use '.index' anymore
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 17:59:21 +0100
changeset 2163 e2dc8c4897be
parent 2162 7967d0b86364
child 2164 cc8ae2a66b0f
stablerange: make sure nobody use '.index' anymore We rename the attribute for good measure.
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Wed Mar 22 17:57:04 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 17:59:21 2017 +0100
@@ -341,7 +341,7 @@
     def __init__(self, repo, head, index, revs=None):
         self._repo = repo.unfiltered()
         self._head = head
-        self.index = index
+        self._index = index
         if revs is not None:
             assert len(revs) == len(self)
             self._revs = revs
@@ -364,7 +364,7 @@
         if idx == 0:
             return self._head
         elif idx == 1:
-            return self.index
+            return self._index
         else:
             raise IndexError(idx)