diff hgext/notify.py @ 28951:1bba1b43525a

notify: do not load style file if template is specified (BC) This patch makes sure that either "tmpl" or "mapfile" is exclusively set, which is the same behavior as common log-like templates and formatter outputs. See the previous patch for why.
author Yuya Nishihara <yuya@tcha.org>
date Mon, 04 Apr 2016 22:50:50 +0900
parents d3c8183f429e
children a0939666b836
line wrap: on
line diff
--- a/hgext/notify.py	Mon Apr 04 22:48:34 2016 +0900
+++ b/hgext/notify.py	Mon Apr 04 22:50:50 2016 +0900
@@ -196,9 +196,11 @@
         self.subs = self.subscribers()
         self.merge = self.ui.configbool('notify', 'merge', True)
 
-        mapfile = self.ui.config('notify', 'style')
+        mapfile = None
         template = (self.ui.config('notify', hooktype) or
                     self.ui.config('notify', 'template'))
+        if not template:
+            mapfile = self.ui.config('notify', 'style')
         if not mapfile and not template:
             template = deftemplates.get(hooktype) or single_template
         self.t = cmdutil.changeset_templater(self.ui, self.repo, False, None,