# HG changeset patch # User Dirkjan Ochtman # Date 1206729644 -3600 # Node ID 4fb8a2e526ffd422f8dd2adbb787c44109be4354 # Parent 688d71563c0735768265be9bc878bcded7db08a7 hgweb: refactor hgweb code [ original upstream description ] diff -r 688d71563c07 -r 4fb8a2e526ff hgkw/keyword.py --- a/hgkw/keyword.py Sat Mar 22 18:33:10 2008 +0100 +++ b/hgkw/keyword.py Fri Mar 28 19:40:44 2008 +0100 @@ -130,15 +130,21 @@ _patch_diff(repo, node1=node1, node2=node2, files=files, match=match, fp=fp, changes=changes, opts=opts) +# monkeypatching hgweb functions changeset and filediff +# actual monkeypatching is done at the bottom of reposetup() + +web_changeset = webcommands.changeset +web_filediff = webcommands.filediff + def _kwweb_changeset(web, req, tmpl): '''Wraps webcommands.changeset turning off keyword expansion.''' kwtools['templater'].matcher = util.never - return web.changeset(tmpl, web.changectx(req)) + return web_changeset(web, req, tmpl) def _kwweb_filediff(web, req, tmpl): '''Wraps webcommands.filediff turning off keyword expansion.''' kwtools['templater'].matcher = util.never - return web.filediff(tmpl, web.filectx(req)) + return web_filediff(web, req, tmpl) def _kwdispatch_parse(ui, args): '''Monkeypatch dispatch._parse to obtain running hg command.'''