commands.debugrevlog: report max chain length
This is sometimes useful to know. Report it.
--- a/mercurial/commands.py Fri Mar 27 20:55:54 2015 -0700
+++ b/mercurial/commands.py Sat Mar 28 12:58:44 2015 -0700
@@ -2843,6 +2843,7 @@
deltasize[2] /= numrevs - numfull
totalsize = fulltotal + deltatotal
avgchainlen = sum(chainlengths) / numrevs
+ maxchainlen = max(chainlengths)
compratio = totalrawsize / totalsize
basedfmtstr = '%%%dd\n'
@@ -2875,6 +2876,7 @@
ui.write('\n')
fmt = dfmtstr(max(avgchainlen, compratio))
ui.write(('avg chain length : ') + fmt % avgchainlen)
+ ui.write(('max chain length : ') + fmt % maxchainlen)
ui.write(('compression ratio : ') + fmt % compratio)
if format > 0:
--- a/tests/test-debugcommands.t Fri Mar 27 20:55:54 2015 -0700
+++ b/tests/test-debugcommands.t Sat Mar 28 12:58:44 2015 -0700
@@ -18,6 +18,7 @@
deltas : 0 ( 0.00%)
avg chain length : 0
+ max chain length : 0
compression ratio : 0
uncompressed data size (min/max/avg) : 43 / 43 / 43