notify extension: generate right number of diffs
authorVadim Gelfer <vadim.gelfer@gmail.com>
Mon, 08 May 2006 11:16:09 -0700
changeset 2224 e8f47dfb70f4
parent 2221 05b6c13f43c6
child 2225 ff43ea94eff4
notify extension: generate right number of diffs
hgext/notify.py
--- a/hgext/notify.py	Mon May 08 10:59:58 2006 -0700
+++ b/hgext/notify.py	Mon May 08 11:16:09 2006 -0700
@@ -225,7 +225,8 @@
         if maxdiff == 0:
             return
         fp = templater.stringio()
-        commands.dodiff(fp, self.ui, self.repo, node,
+        prev = self.repo.changelog.parents(node)[0]
+        commands.dodiff(fp, self.ui, self.repo, prev,
                         self.repo.changelog.tip())
         difflines = fp.getvalue().splitlines(1)
         if maxdiff > 0 and len(difflines) > maxdiff: