diff mercurial/commands.py @ 24503:944749de6f3a

commands.debugrevlog: report max chain length This is sometimes useful to know. Report it.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 28 Mar 2015 12:58:44 -0700
parents 0142b59f5743
children 51930a7180bd
line wrap: on
line diff
--- 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: