changeset 2173:53352bf5b7fc

stablerange: make sure nobody use '.depth' anymore
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 22 Mar 2017 18:55:26 +0100
parents e2394b33ae51
children 71c518470e2c
files hgext3rd/evolve/stablerange.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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