stablerange: drop length from the class
There is not remaining user.
--- a/hgext3rd/evolve/stablerange.py Wed Mar 22 19:26:40 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py Wed Mar 22 19:28:14 2017 +0100
@@ -345,7 +345,8 @@
self._head = head
self._index = index
if revs is not None:
- assert len(revs) == self._len()
+ length = self._repo.stablerange.rangelength(self._repo, self)
+ assert len(revs) == length
self._revs = revs
depth = self._repo.stablerange.depthrev(self._repo, self[0])
assert index < depth, (head, index, depth, revs)
@@ -375,13 +376,11 @@
def _stablekey(self):
return (self[0], self[1])
- def _len(self):
- return self._repo.stablerange.rangelength(self._repo, self)
-
@util.propertycache
def _revs(self):
+ length = self._repo.stablerange.rangelength(self._repo, self)
r = stablesort(self._repo, [self[0]])[self[1]:]
- assert len(r) == self._len(), (self[0], self[1], len(r), self._len())
+ assert len(r) == length, (self[0], self[1], len(r), length)
return r
@eh.reposetup