--- a/.hgignore Fri Mar 28 19:40:44 2008 +0100
+++ b/.hgignore Mon Mar 31 13:41:04 2008 +0200
@@ -6,6 +6,7 @@
*.swp
*.orig
*.rej
+.DS_Store
build/*
MANIFEST
--- a/hgkw/keyword.py Fri Mar 28 19:40:44 2008 +0100
+++ b/hgkw/keyword.py Mon Mar 31 13:41:04 2008 +0200
@@ -110,6 +110,8 @@
_patchfile_init = patch.patchfile.__init__
_patch_diff = patch.diff
_dispatch_parse = dispatch._parse
+_webcommands_changeset = webcommands.changeset
+_webcommands_filediff = webcommands.filediff
def _kwpatchfile_init(self, ui, fname, missing=False):
'''Monkeypatch/wrap patch.patchfile.__init__ to avoid
@@ -130,21 +132,15 @@
_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(web, req, tmpl)
+ return _webcommands_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(web, req, tmpl)
+ return _webcommands_filediff(web, req, tmpl)
def _kwdispatch_parse(ui, args):
'''Monkeypatch dispatch._parse to obtain running hg command.'''
@@ -153,6 +149,7 @@
return cmd, func, args, options, cmdoptions
# dispatch._parse is run before reposetup, so wrap it here
+# all other actual monkey patching is done at end of reposetup
dispatch._parse = _kwdispatch_parse