--- a/hgext/notify.py Tue May 16 11:07:56 2006 +0200
+++ b/hgext/notify.py Tue May 16 14:17:45 2006 -0700
@@ -228,14 +228,13 @@
mail = self.ui.sendmail()
mail.sendmail(templater.email(msg['From']), self.subs, msgtext)
- def diff(self, node):
+ def diff(self, node, ref):
maxdiff = int(self.ui.config('notify', 'maxdiff', 300))
if maxdiff == 0:
return
fp = templater.stringio()
prev = self.repo.changelog.parents(node)[0]
- commands.dodiff(fp, self.ui, self.repo, prev,
- self.repo.changelog.tip())
+ commands.dodiff(fp, self.ui, self.repo, prev, ref)
difflines = fp.getvalue().splitlines(1)
if maxdiff > 0 and len(difflines) > maxdiff:
self.sio.write(_('\ndiffs (truncated from %d to %d lines):\n\n') %
@@ -260,8 +259,9 @@
count = end - start
for rev in xrange(start, end):
n.node(repo.changelog.node(rev))
+ n.diff(node, repo.changelog.tip())
else:
count = 1
n.node(node)
- n.diff(node)
+ n.diff(node, node)
n.send(node, count)