hgkw/keyword.py
branch0.9.2compat
changeset 435 7bc92583f344
parent 433 d830cdde0ddb
child 444 987648c1ff69
equal deleted inserted replaced
434:0884558504a3 435:7bc92583f344
   171     _webcommands_filediff = webcommands.filediff
   171     _webcommands_filediff = webcommands.filediff
   172 
   172 
   173     def _kwweb_changeset(web, req, tmpl):
   173     def _kwweb_changeset(web, req, tmpl):
   174         '''Wraps webcommands.changeset turning off keyword expansion.'''
   174         '''Wraps webcommands.changeset turning off keyword expansion.'''
   175         kwtools['templater'].matcher = util.never
   175         kwtools['templater'].matcher = util.never
   176         try:
   176         return _webcommands_changeset(web, req, tmpl)
   177             return _webcommands_changeset(web, req, tmpl)
       
   178         except TypeError:
       
   179             return _webcommands_changeset(tmpl, web.changectx(req))
       
   180 
   177 
   181     def _kwweb_filediff(web, req, tmpl):
   178     def _kwweb_filediff(web, req, tmpl):
   182         '''Wraps webcommands.filediff turning off keyword expansion.'''
   179         '''Wraps webcommands.filediff turning off keyword expansion.'''
   183         kwtools['templater'].matcher = util.never
   180         kwtools['templater'].matcher = util.never
   184         try:
   181         return _webcommands_filediff(web, req, tmpl)
   185             return _webcommands_filediff(web, req, tmpl)
       
   186         except TypeError:
       
   187             return _webcommands_filediff(tmpl, web.filectx(req))
       
   188 
   182 
   189     webcommands.changeset = webcommands.rev = _kwweb_changeset
   183     webcommands.changeset = webcommands.rev = _kwweb_changeset
   190     webcommands.filediff = webcommands.diff = _kwweb_filediff
   184     webcommands.filediff = webcommands.diff = _kwweb_filediff
   191 
   185 
   192 except ImportError:
   186 except ImportError: