stablerange: make sure nobody use '.head' anymore
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 17:47:09 +0100
changeset 2155 89ce52e855ed
parent 2154 f02f63c26424
child 2156 e57f28fafe41
stablerange: make sure nobody use '.head' anymore We rename the attribute for good measure.
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Wed Mar 22 17:45:39 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 17:47:09 2017 +0100
@@ -340,7 +340,7 @@
 
     def __init__(self, repo, head, index, revs=None):
         self._repo = repo.unfiltered()
-        self.head = head
+        self._head = head
         self.index = index
         if revs is not None:
             assert len(revs) == len(self)
@@ -362,7 +362,7 @@
     def __getitem__(self, idx):
         """small helper function to prepare for the migration to tuple"""
         if idx == 0:
-            return self.head
+            return self._head
         elif idx == 1:
             return self.index
         else: