Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/debugcommands.py @ 33074: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 | 03eefca3ed33 |
children | 05906b8e1d23 |
comparison
equal
deleted
inserted
replaced
33073:c41cbe98822c | 33074:e21b750c9b9e |
---|---|
1883 for chunktype in sorted(chunktypecounts): | 1883 for chunktype in sorted(chunktypecounts): |
1884 ui.write(fmtchunktype(chunktype)) | 1884 ui.write(fmtchunktype(chunktype)) |
1885 ui.write(fmt % pcfmt(chunktypesizes[chunktype], totalsize)) | 1885 ui.write(fmt % pcfmt(chunktypesizes[chunktype], totalsize)) |
1886 | 1886 |
1887 ui.write('\n') | 1887 ui.write('\n') |
1888 fmt = dfmtstr(max(avgchainlen, compratio)) | 1888 fmt = dfmtstr(max(avgchainlen, maxchainlen, maxchainspan, compratio)) |
1889 ui.write(('avg chain length : ') + fmt % avgchainlen) | 1889 ui.write(('avg chain length : ') + fmt % avgchainlen) |
1890 ui.write(('max chain length : ') + fmt % maxchainlen) | 1890 ui.write(('max chain length : ') + fmt % maxchainlen) |
1891 ui.write(('max chain reach : ') + fmt % maxchainspan) | 1891 ui.write(('max chain reach : ') + fmt % maxchainspan) |
1892 ui.write(('compression ratio : ') + fmt % compratio) | 1892 ui.write(('compression ratio : ') + fmt % compratio) |
1893 | 1893 |
1894 if format > 0: | 1894 if format > 0: |
1895 ui.write('\n') | 1895 ui.write('\n') |
1896 ui.write(('uncompressed data size (min/max/avg) : %d / %d / %d\n') | 1896 ui.write(('uncompressed data size (min/max/avg) : %d / %d / %d\n') |