hgext/notify.py
changeset 24306 6ddc86eedc3b
parent 23454 317ccfbd1a84
child 24987 fd7287f0b43c
--- a/hgext/notify.py	Fri Mar 13 14:20:13 2015 -0400
+++ b/hgext/notify.py	Fri Mar 13 17:00:06 2015 -0400
@@ -340,7 +340,10 @@
 
         maxdiff = int(self.ui.config('notify', 'maxdiff', 300))
         prev = ctx.p1().node()
-        ref = ref and ref.node() or ctx.node()
+        if ref:
+            ref = ref.node()
+        else:
+            ref = ctx.node()
         chunks = patch.diff(self.repo, prev, ref,
                             opts=patch.diffallopts(self.ui))
         difflines = ''.join(chunks).splitlines()