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: |