# HG changeset patch # User Christian Ebert # Date 1261569844 0 # Node ID 52b03aad673ba43154e13f172d713f0869014a9f # Parent dead519e4ec647aca5ebd5098037834635c8da59 Do not monkeypatch diff when in restricted mode kw_diff actually disabled restricted mode when 2 revisions were given, because it effectively disables the extension in this case. But the commands working with diff and patch need restricted mode always enabled, i.e. expansion enabled when writing to the working directory and - crucial for these commands - no expansion when reading the filelog. diff -r dead519e4ec6 -r 52b03aad673b hgkw/keyword.py --- a/hgkw/keyword.py Sun Nov 29 11:27:33 2009 +0000 +++ b/hgkw/keyword.py Wed Dec 23 12:04:04 2009 +0000 @@ -537,7 +537,8 @@ repo.__class__ = kwrepo extensions.wrapfunction(patch.patchfile, '__init__', kwpatchfile_init) - extensions.wrapfunction(patch, 'diff', kw_diff) + if not kwt.restrict: + extensions.wrapfunction(patch, 'diff', kw_diff) for c in 'annotate changeset rev filediff diff'.split(): extensions.wrapfunction(webcommands, c, kwweb_skip)