[PATCH 7 of 8 STABLE] debugrevlog: handle no totalrawsize
timeless
timeless at mozdev.org
Mon Feb 1 07:29:18 UTC 2016
# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1454273832 0
# Sun Jan 31 20:57:12 2016 +0000
# Branch stable
# Node ID f45868741d783847ab04531df73eff5d6c4b2304
# Parent 28f17ee0e20d30d547729532164c77f1a29f9e64
debugrevlog: handle no totalrawsize
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3314,17 +3314,22 @@
ui.write(('flags : %s\n') % ', '.join(flags))
ui.write('\n')
- fmt = pcfmtstr(totalsize)
- fmt2 = dfmtstr(totalsize)
+ if totalrawsize:
+ fmt = pcfmtstr(totalsize)
+ fmt2 = dfmtstr(totalsize)
+ else:
+ fmt = pcfmtstr(numrevs)
+ fmt2 = dfmtstr(numrevs)
ui.write(('revisions : ') + fmt2 % numrevs)
ui.write((' merges : ') + fmt % pcfmt(nummerges, numrevs))
ui.write((' normal : ') + fmt % pcfmt(numrevs - nummerges, numrevs))
ui.write(('revisions : ') + fmt2 % numrevs)
ui.write((' full : ') + fmt % pcfmt(numfull, numrevs))
ui.write((' deltas : ') + fmt % pcfmt(numdeltas, numrevs))
- ui.write(('revision size : ') + fmt2 % totalsize)
- ui.write((' full : ') + fmt % pcfmt(fulltotal, totalsize))
- ui.write((' deltas : ') + fmt % pcfmt(deltatotal, totalsize))
+ if totalrawsize:
+ ui.write(('revision size : ') + fmt2 % totalsize)
+ ui.write((' full : ') + fmt % pcfmt(fulltotal, totalsize))
+ ui.write((' deltas : ') + fmt % pcfmt(deltatotal, totalsize))
if chainlengths:
ui.write('\n')
diff --git a/tests/test-debugcommands.t b/tests/test-debugcommands.t
--- a/tests/test-debugcommands.t
+++ b/tests/test-debugcommands.t
@@ -44,9 +44,6 @@
revisions : 1
full : 1 (100.00%)
deltas : 0 ( 0.00%)
- revision size : 0
- full : 0 (100.00%)
- deltas : 0 (100.00%)
avg chain length : 0
max chain length : 0
More information about the Mercurial-devel
mailing list