hgext/notify.py
changeset 4081 e6d26e71f049
parent 3891 6b4127c7d52a
parent 4077 1305ba7dee88
child 4096 49237d6ae97d
--- a/hgext/notify.py	Tue Jan 02 21:40:20 2007 -0800
+++ b/hgext/notify.py	Tue Feb 13 10:25:45 2007 -0200
@@ -240,7 +240,9 @@
         difflines = self.ui.popbuffer().splitlines(1)
         if self.ui.configbool('notify', 'diffstat', True):
             s = patch.diffstat(difflines)
-            self.ui.write('\ndiffstat:\n\n' + s)
+            # s may be nil, don't include the header if it is
+            if s:
+                self.ui.write('\ndiffstat:\n\n%s' % s)
         if maxdiff > 0 and len(difflines) > maxdiff:
             self.ui.write(_('\ndiffs (truncated from %d to %d lines):\n\n') %
                           (len(difflines), maxdiff))