RFC - adding more info commits in verbose mode
Marcus Lindblom
macke at yar.nu
Mon Apr 13 15:33:54 CDT 2009
Hi,
I'd like to see summary of the number of files and lines that has
changed with a commit. The current verbose output doesn't do that.
I added a diffstat print to the commit command (see patch below), which
works well, but now each file is listed twice. I don't know how to
remove the initial list of files (i.e. the list printed before the
rev-id of the new changeset is output).
Ideas and input welcome.
Cheers,
/Marcus
diff -r 84d0fe34427b mercurial/commands.py
--- a/mercurial/commands.py Wed Apr 08 02:38:23 2009 +0900
+++ b/mercurial/commands.py Mon Apr 13 22:29:08 2009 +0200
@@ -658,7 +658,11 @@
if ui.debugflag:
ui.write(_('committed changeset %d:%s\n') % (rev,hex(node)))
elif ui.verbose:
ui.write(_('committed changeset %d:%s\n') % (rev,short(node)))
+ # print diff summary on non-merge commit only
+ if parents[1] == -1:
+ diff = patch.diff(repo, cl.node(parents[0]), node)
+ ui.write(patch.diffstat(util.iterlines(diff)))
def copy(ui, repo, *pats, **opts):
"""mark files as copied for the next commit
More information about the Mercurial-devel
mailing list