stablerange: use rangelength in debugstablerange
We stop using the building '__len__' this get use closer to be able to use a
tuple.
--- a/hgext3rd/evolve/obsdiscovery.py Wed Mar 22 18:35:05 2017 +0100
+++ b/hgext3rd/evolve/obsdiscovery.py Wed Mar 22 18:36:37 2017 +0100
@@ -398,13 +398,14 @@
# prewarm depth cache
repo.stablerange.warmup(repo, revs)
cl = repo.changelog
+ rangelength = repo.stablerange.rangelength
ranges = stablerange.subrangesclosure(repo, revs)
ui.status('rev node index size depth obshash\n')
for r in ranges:
d = (r[0],
s(cl.node(r[0])),
r[1],
- len(r),
+ rangelength(repo, r),
r.depth,
node.short(_obshashrange(repo, r)))
ui.status('%3d %s %5d %4d %5d %s\n' % d)