stablerange: make sure nobody use '.depth' anymore
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 18:55:26 +0100
changeset 2173 53352bf5b7fc
parent 2172 e2394b33ae51
child 2174 71c518470e2c
stablerange: make sure nobody use '.depth' anymore
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Wed Mar 22 18:54:45 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 18:55:26 2017 +0100
@@ -346,11 +346,11 @@
         if revs is not None:
             assert len(revs) == self._len()
             self._revs = revs
-        assert index < self.depth, (head, index, self.depth, revs)
+        assert index < self._depth, (head, index, self._depth, revs)
 
     def __repr__(self):
         nodehead = self._repo.changelog.node(self[0])
-        return '%s %d %d %s' % (nodemod.short(nodehead), self.depth, self[1], nodemod.short(self.obshash))
+        return '%s %d %d %s' % (nodemod.short(nodehead), self._depth, self[1], nodemod.short(self.obshash))
 
     def __hash__(self):
         return self._id
@@ -381,7 +381,7 @@
         return self._repo.stablerange.rangelength(self._repo, self)
 
     @util.propertycache
-    def depth(self):
+    def _depth(self):
         return self._repo.stablerange.depthrev(self._repo, self[0])
 
     @util.propertycache