Show More
@@ -234,8 +234,6 class notifier(object): | |||||
234 |
|
234 | |||
235 | def diff(self, node, ref): |
|
235 | def diff(self, node, ref): | |
236 | maxdiff = int(self.ui.config('notify', 'maxdiff', 300)) |
|
236 | maxdiff = int(self.ui.config('notify', 'maxdiff', 300)) | |
237 | if maxdiff == 0: |
|
|||
238 | return |
|
|||
239 | prev = self.repo.changelog.parents(node)[0] |
|
237 | prev = self.repo.changelog.parents(node)[0] | |
240 | self.ui.pushbuffer() |
|
238 | self.ui.pushbuffer() | |
241 | patch.diff(self.repo, prev, ref) |
|
239 | patch.diff(self.repo, prev, ref) | |
@@ -245,6 +243,8 class notifier(object): | |||||
245 | # s may be nil, don't include the header if it is |
|
243 | # s may be nil, don't include the header if it is | |
246 | if s: |
|
244 | if s: | |
247 | self.ui.write('\ndiffstat:\n\n%s' % s) |
|
245 | self.ui.write('\ndiffstat:\n\n%s' % s) | |
|
246 | if maxdiff == 0: | |||
|
247 | return | |||
248 | if maxdiff > 0 and len(difflines) > maxdiff: |
|
248 | if maxdiff > 0 and len(difflines) > maxdiff: | |
249 | self.ui.write(_('\ndiffs (truncated from %d to %d lines):\n\n') % |
|
249 | self.ui.write(_('\ndiffs (truncated from %d to %d lines):\n\n') % | |
250 | (len(difflines), maxdiff)) |
|
250 | (len(difflines), maxdiff)) |
General Comments 0
You need to be logged in to leave comments.
Login now