changeset 2296:6e8e3dd7976e

notify changeset diff should be against current node instead of tip
author "Aurelien Jacobs <aurel@gnuage.org>"
date Tue, 16 May 2006 14:17:45 -0700
parents 9c15f85e61b1
children 936b615eb44e
files hgext/notify.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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)