changeset 6305:e8d447d91cdb

notify: print diffstat even if maxline == 0
author Benoît Allard <benoit@aeteurope.nl>
date Thu, 20 Mar 2008 16:42:51 +0100
parents d99b4e8652b3
children 2f9de4aaea9e
files hgext/notify.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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))