# HG changeset patch # User BenoƮt Allard # Date 1206027771 -3600 # Node ID e8d447d91cdbd8742aecb7ffaf34b19ab9f4adfe # Parent d99b4e8652b3e52b45247ac8dd0ae38134aacc7c notify: print diffstat even if maxline == 0 diff -r d99b4e8652b3 -r e8d447d91cdb hgext/notify.py --- a/hgext/notify.py Thu Mar 20 01:47:35 2008 +0100 +++ b/hgext/notify.py Thu Mar 20 16:42:51 2008 +0100 @@ -234,8 +234,6 @@ def diff(self, node, ref): maxdiff = int(self.ui.config('notify', 'maxdiff', 300)) - if maxdiff == 0: - return prev = self.repo.changelog.parents(node)[0] self.ui.pushbuffer() patch.diff(self.repo, prev, ref) @@ -245,6 +243,8 @@ # 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: + return if maxdiff > 0 and len(difflines) > maxdiff: self.ui.write(_('\ndiffs (truncated from %d to %d lines):\n\n') % (len(difflines), maxdiff))