Mercurial > hg > mercurial-crew-with-dirclash
diff hgext/notify.py @ 4081:e6d26e71f049
merge with crew-stable
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Tue, 13 Feb 2007 10:25:45 -0200 |
parents | 6b4127c7d52a 1305ba7dee88 |
children | 49237d6ae97d |
line wrap: on
line diff
--- a/hgext/notify.py +++ b/hgext/notify.py @@ -240,7 +240,9 @@ class notifier(object): 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))