# HG changeset patch # User Brodie Rao # Date 2009-10-25 00:35:35 # Node ID 5384a22ab698b8282cae6f0861e1bfb210fdb9e8 # Parent 8f8f9685ac5ed9b2a041c82cf5cbac87bab1b4cc 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). diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -1407,8 +1407,8 @@ def diffstat(lines, width=80): 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')