changeset 10116:4b514a70ea72 stable

keyword: 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.
author Christian Ebert <blacktrash@gmx.net>
date Wed, 23 Dec 2009 12:04:04 +0000
parents 3e7663b2f3fc
children 98867145f4b5
files hgext/keyword.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/keyword.py	Wed Dec 23 13:09:11 2009 +0100
+++ b/hgext/keyword.py	Wed Dec 23 12:04:04 2009 +0000
@@ -536,7 +536,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)