hgkw/keyword.py
branch0.9.2compat
changeset 414 13043607c6ae
parent 412 79a44b1c202b
child 417 e089672ef9b4
equal deleted inserted replaced
412:79a44b1c202b 414:13043607c6ae
   169     from mercurial.hgweb import webcommands
   169     from mercurial.hgweb import webcommands
   170 
   170 
   171     def _kwweb_changeset(web, req, tmpl):
   171     def _kwweb_changeset(web, req, tmpl):
   172         '''Wraps webcommands.changeset turning off keyword expansion.'''
   172         '''Wraps webcommands.changeset turning off keyword expansion.'''
   173         if kwx['templater']:
   173         if kwx['templater']:
   174             kwx['templater'].matcher = util.neve
   174             kwx['templater'].matcher = util.never
   175         return web.changeset(tmpl, web.changectx(req))
   175         return web.changeset(tmpl, web.changectx(req))
   176 
   176 
   177     def _kwweb_filediff(web, req, tmpl):
   177     def _kwweb_filediff(web, req, tmpl):
   178         '''Wraps webcommands.filediff turning off keyword expansion.'''
   178         '''Wraps webcommands.filediff turning off keyword expansion.'''
   179         if kwx['templater']:
   179         if kwx['templater']:
   180             kwx['templater'].matcher = util.neve
   180             kwx['templater'].matcher = util.never
   181         return web.filediff(tmpl, web.filectx(req))
   181         return web.filediff(tmpl, web.filectx(req))
   182 
   182 
   183     webcommands.changeset = webcommands.rev = _kwweb_changeset
   183     webcommands.changeset = webcommands.rev = _kwweb_changeset
   184     webcommands.filediff = webcommands.diff = _kwweb_filediff
   184     webcommands.filediff = webcommands.diff = _kwweb_filediff
   185 
   185