changeset 2224:e8f47dfb70f4

notify extension: generate right number of diffs
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Mon, 08 May 2006 11:16:09 -0700
parents 05b6c13f43c6
children ff43ea94eff4
files hgext/notify.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: