(0.9.2compat) no conditional for web file match disabling 0.9.2compat
authorChristian Ebert <blacktrash@gmx.net>
Sun, 30 Mar 2008 17:04:37 +0200
branch0.9.2compat
changeset 432 140fe33eacf3
parent 424 6a310d6b40c4
child 433 d830cdde0ddb
(0.9.2compat) no conditional for web file match disabling
hgkw/keyword.py
--- a/hgkw/keyword.py	Tue Mar 11 23:54:10 2008 +0100
+++ b/hgkw/keyword.py	Sun Mar 30 17:04:37 2008 +0200
@@ -170,14 +170,12 @@
 
     def _kwweb_changeset(web, req, tmpl):
         '''Wraps webcommands.changeset turning off keyword expansion.'''
-        if kwtools['templater']:
-            kwtools['templater'].matcher = util.never
+        kwtools['templater'].matcher = util.never
         return web.changeset(tmpl, web.changectx(req))
 
     def _kwweb_filediff(web, req, tmpl):
         '''Wraps webcommands.filediff turning off keyword expansion.'''
-        if kwtools['templater']:
-            kwtools['templater'].matcher = util.never
+        kwtools['templater'].matcher = util.never
         return web.filediff(tmpl, web.filectx(req))
 
     webcommands.changeset = webcommands.rev = _kwweb_changeset
@@ -187,13 +185,11 @@
     from mercurial.hgweb.hgweb_mod import hgweb
 
     def _kwweb_do_changeset(self, req):
-        if kwtools['templater']:
-            kwtools['templater'].matcher = util.never
+        kwtools['templater'].matcher = util.never
         req.write(self.changeset(self.changectx(req)))
 
     def _kwweb_do_filediff(self, req):
-        if kwtools['templater']:
-            kwtools['templater'].matcher = util.never
+        kwtools['templater'].matcher = util.never
         req.write(self.filediff(self.filectx(req)))
 
     hgweb.do_changeset = hgweb.do_rev = _kwweb_do_changeset