changeset 2155:89ce52e855ed

stablerange: make sure nobody use '.head' anymore We rename the attribute for good measure.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 22 Mar 2017 17:47:09 +0100
parents f02f63c26424
children e57f28fafe41
files hgext3rd/evolve/stablerange.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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: