diffstat: print 0 instead of nothing for 0 adds or removes
authorBrodie Rao <me+hg@dackz.net>
Sun, 25 Oct 2009 02:35:35 +0200
changeset 9639 5384a22ab698
parent 9638 8f8f9685ac5e
child 9640 9e76232fbfbe
diffstat: print 0 instead of nothing for 0 adds or removes This is in line with how the stock diffstat behaves when processing a single diff with no line modifications (like a binary diff).
mercurial/patch.py
--- a/mercurial/patch.py	Sat Oct 24 12:29:39 2009 +0200
+++ b/mercurial/patch.py	Sun Oct 25 02:35:35 2009 +0200
@@ -1407,8 +1407,8 @@
     for filename, adds, removes in stats:
         pluses = '+' * scale(adds)
         minuses = '-' * scale(removes)
-        output.append(' %-*s |  %*.d %s%s\n' % (maxname, filename, countwidth,
-                                                adds+removes, pluses, minuses))
+        output.append(' %-*s |  %*s %s%s\n' % (maxname, filename, countwidth,
+                                               adds+removes, pluses, minuses))
 
     if stats:
         output.append(_(' %d files changed, %d insertions(+), %d deletions(-)\n')