[PATCH 4 of 9] debugrevlog: format columns (more) nicely when dumping index data

Mads Kiilerich mads at kiilerich.com
Tue Mar 18 18:33:52 CDT 2014


# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1395184418 -3600
#      Wed Mar 19 00:13:38 2014 +0100
# Node ID 707d9e8921215ad47b5b1712f6c06b0d345c6296
# Parent  73968b322f241048e1e5fc2de8ba6dcd9f31809a
debugrevlog: format columns (more) nicely when dumping index data

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2465,7 +2465,7 @@ def debugrevlog(ui, repo, file_=None, **
 
     if opts.get("dump"):
         numrevs = len(r)
-        ui.write("# rev p1rev p2rev start end deltastart base p1 p2"
+        ui.write("# rev p1rev p2rev start   end deltastart base   p1   p2"
                  " rawsize totalsize compression heads\n")
         ts = 0
         heads = set()
@@ -2479,7 +2479,7 @@ def debugrevlog(ui, repo, file_=None, **
             ts = ts + rs
             heads -= set(r.parentrevs(rev))
             heads.add(rev)
-            ui.write("%d %d %d %d %d %d %d %d %d %d %d %d %d\n" %
+            ui.write("%5d %5d %5d %5d %5d %10d %4d %4d %4d %7d %9d %11d %5d\n" %
                      (rev, p1, p2, r.start(rev), r.end(rev),
                       r.start(dbase), r.start(cbase),
                       r.start(p1), r.start(p2),


More information about the Mercurial-devel mailing list