stablerange: drop _depth
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 19:26:40 +0100
changeset 2179 97d342655cd1
parent 2178 67a511b6b3aa
child 2180 7570e0683460
stablerange: drop _depth Nothing uses it anymore.
hgext3rd/evolve/stablerange.py
--- a/hgext3rd/evolve/stablerange.py	Wed Mar 22 19:25:12 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py	Wed Mar 22 19:26:40 2017 +0100
@@ -347,7 +347,8 @@
         if revs is not None:
             assert len(revs) == self._len()
             self._revs = revs
-        assert index < self._depth, (head, index, self._depth, revs)
+        depth = self._repo.stablerange.depthrev(self._repo, self[0])
+        assert index < depth, (head, index, depth, revs)
 
     def __hash__(self):
         return self._id
@@ -378,10 +379,6 @@
         return self._repo.stablerange.rangelength(self._repo, self)
 
     @util.propertycache
-    def _depth(self):
-        return self._repo.stablerange.depthrev(self._repo, self[0])
-
-    @util.propertycache
     def _revs(self):
         r = stablesort(self._repo, [self[0]])[self[1]:]
         assert len(r) == self._len(), (self[0], self[1], len(r), self._len())