stablerange: use rangelength in '_slicesatrange'
We stop using the building '__len__' this get use closer to be able to use a
tuple.
--- a/hgext3rd/evolve/stablerange.py Wed Mar 22 18:40:19 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py Wed Mar 22 18:40:54 2017 +0100
@@ -296,8 +296,7 @@
slices.append(top)
return slices
- @staticmethod
- def _slicesrangeatmerge(repo, rangeid, globalindex):
+ def _slicesrangeatmerge(self, repo, rangeid, globalindex):
localindex = globalindex - rangeid[1]
cl = repo.changelog
@@ -306,7 +305,7 @@
top = stablerange(repo, rangeid[0], globalindex, rangeid._revs[localindex:])
#
toprootdepth = repo.stablerange.depthrev(repo, top._revs[0])
- if toprootdepth + len(top) == rangeid.depth + 1:
+ if toprootdepth + self.rangelength(repo, top) == rangeid.depth + 1:
bheads = [bottom[-1]]
else:
bheads = set(bottom)