[PATCH] debugrevdata: fix dumping manifest fails on empty first revision (issue5062)
liscju
piotr.listkiewicz at gmail.com
Wed Feb 10 20:07:58 UTC 2016
# HG changeset patch
# User liscju <piotr.listkiewicz at gmail.com>
# Date 1455134512 -3600
# Wed Feb 10 21:01:52 2016 +0100
# Node ID c93511a482b05e2c2f49bc485991072b97e00117
# Parent a036e1ae1fbe88ab99cb861ebfc2e4da7a3912ca
debugrevdata: fix dumping manifest fails on empty first revision (issue5062)
diff -r a036e1ae1fbe -r c93511a482b0 mercurial/commands.py
--- a/mercurial/commands.py Sun Feb 07 00:49:31 2016 -0600
+++ b/mercurial/commands.py Wed Feb 10 21:01:52 2016 +0100
@@ -3215,12 +3215,16 @@
ts = ts + rs
heads -= set(r.parentrevs(rev))
heads.add(rev)
+ try:
+ compression = ts / r.end(rev)
+ except ZeroDivisionError:
+ compression = 0
ui.write("%5d %5d %5d %5d %5d %10d %4d %4d %4d %7d %9d "
"%11d %5d %8d\n" %
(rev, p1, p2, r.start(rev), r.end(rev),
r.start(dbase), r.start(cbase),
r.start(p1), r.start(p2),
- rs, ts, ts / r.end(rev), len(heads), clen))
+ rs, ts, compression, len(heads), clen))
return 0
v = r.version
More information about the Mercurial-devel
mailing list