changeset 33062:e21b750c9b9e

debugrevlog: align chain length, reach, and compression ratio I think this is what the max(...) exists for.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 26 Jun 2017 22:27:34 +0900
parents c41cbe98822c
children 7f569ce30216
files mercurial/debugcommands.py tests/test-debugcommands.t
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Fri Jun 23 17:19:29 2017 +0200
+++ b/mercurial/debugcommands.py	Mon Jun 26 22:27:34 2017 +0900
@@ -1885,10 +1885,10 @@
         ui.write(fmt % pcfmt(chunktypesizes[chunktype], totalsize))
 
     ui.write('\n')
-    fmt = dfmtstr(max(avgchainlen, compratio))
+    fmt = dfmtstr(max(avgchainlen, maxchainlen, maxchainspan, compratio))
     ui.write(('avg chain length  : ') + fmt % avgchainlen)
     ui.write(('max chain length  : ') + fmt % maxchainlen)
-    ui.write(('max chain reach  : ') + fmt % maxchainspan)
+    ui.write(('max chain reach   : ') + fmt % maxchainspan)
     ui.write(('compression ratio : ') + fmt % compratio)
 
     if format > 0:
--- a/tests/test-debugcommands.t	Fri Jun 23 17:19:29 2017 +0200
+++ b/tests/test-debugcommands.t	Mon Jun 26 22:27:34 2017 +0900
@@ -27,10 +27,10 @@
   chunks size   : 44
       0x75 (u)  : 44 (100.00%)
   
-  avg chain length  : 0
-  max chain length  : 0
-  max chain reach  : 44
-  compression ratio : 0
+  avg chain length  :  0
+  max chain length  :  0
+  max chain reach   : 44
+  compression ratio :  0
   
   uncompressed data size (min/max/avg) : 43 / 43 / 43
   full revision size (min/max/avg)     : 44 / 44 / 44