Patchwork [5,of,7] notify: explicitly honor all diffopts

login
register
mail settings
Submitter Siddharth Agarwal
Date Dec. 2, 2014, 6:30 p.m.
Message ID <33afcb7f2d0800545ebd.1417545016@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/6953/
State Accepted
Commit 0b49c847bf9284e830cc6d82453adff7cd9fd379
Headers show

Comments

Siddharth Agarwal - Dec. 2, 2014, 6:30 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1416376067 28800
#      Tue Nov 18 21:47:47 2014 -0800
# Node ID 33afcb7f2d0800545ebddda286d5ddd6a057f85d
# Parent  b1c21372050f7df6011214a1c6c7b01f7267ea87
notify: explicitly honor all diffopts

The notify output doesn't seem to be parseable anyway, what with the maxdiff
config option. Plus it is designed mainly for servers where hopefully the
admins are doing sensible things.

Patch

diff --git a/hgext/notify.py b/hgext/notify.py
--- a/hgext/notify.py
+++ b/hgext/notify.py
@@ -341,7 +341,8 @@ 
         maxdiff = int(self.ui.config('notify', 'maxdiff', 300))
         prev = ctx.p1().node()
         ref = ref and ref.node() or ctx.node()
-        chunks = patch.diff(self.repo, prev, ref, opts=patch.diffopts(self.ui))
+        chunks = patch.diff(self.repo, prev, ref,
+                            opts=patch.diffallopts(self.ui))
         difflines = ''.join(chunks).splitlines()
 
         if self.ui.configbool('notify', 'diffstat', True):