Show More
@@ -228,14 +228,13 b' class notifier(object):' | |||
|
228 | 228 | mail = self.ui.sendmail() |
|
229 | 229 | mail.sendmail(templater.email(msg['From']), self.subs, msgtext) |
|
230 | 230 | |
|
231 | def diff(self, node): | |
|
231 | def diff(self, node, ref): | |
|
232 | 232 | maxdiff = int(self.ui.config('notify', 'maxdiff', 300)) |
|
233 | 233 | if maxdiff == 0: |
|
234 | 234 | return |
|
235 | 235 | fp = templater.stringio() |
|
236 | 236 | prev = self.repo.changelog.parents(node)[0] |
|
237 | commands.dodiff(fp, self.ui, self.repo, prev, | |
|
238 | self.repo.changelog.tip()) | |
|
237 | commands.dodiff(fp, self.ui, self.repo, prev, ref) | |
|
239 | 238 | difflines = fp.getvalue().splitlines(1) |
|
240 | 239 | if maxdiff > 0 and len(difflines) > maxdiff: |
|
241 | 240 | self.sio.write(_('\ndiffs (truncated from %d to %d lines):\n\n') % |
@@ -260,8 +259,9 b' def hook(ui, repo, hooktype, node=None, ' | |||
|
260 | 259 | count = end - start |
|
261 | 260 | for rev in xrange(start, end): |
|
262 | 261 | n.node(repo.changelog.node(rev)) |
|
262 | n.diff(node, repo.changelog.tip()) | |
|
263 | 263 | else: |
|
264 | 264 | count = 1 |
|
265 | 265 | n.node(node) |
|
266 | n.diff(node) | |
|
266 | n.diff(node, node) | |
|
267 | 267 | n.send(node, count) |
General Comments 0
You need to be logged in to leave comments.
Login now