keyword: remove mq commands from restricted list
Monkeypatching patch.diff takes care of this since
911f5be5d159.
Test mq more thoroughly by loosening [keywordmaps] and comparing
the output of hg cat with keyword expansion enabled and disabled.
--- a/hgext/keyword.py Wed Apr 28 11:10:58 2010 -0300
+++ b/hgext/keyword.py Mon Apr 26 03:54:18 2010 +0200
@@ -92,8 +92,7 @@
# hg commands that trigger expansion only when writing to working dir,
# not when reading filelog, and unexpand when reading from working dir
-restricted = ('merge record resolve qfold qimport qnew qpush qrefresh qrecord'
- ' transplant')
+restricted = 'merge record qrecord resolve transplant'
# provide cvs-like UTC date filter
utcdate = lambda x: util.datestr((x[0], 0), '%Y/%m/%d %H:%M:%S')
--- a/tests/test-keyword Wed Apr 28 11:10:58 2010 -0300
+++ b/tests/test-keyword Mon Apr 26 03:54:18 2010 +0200
@@ -21,7 +21,7 @@
cat <<EOF >> $HGRCPATH
[keyword]
-* =
+** =
b = ignore
[hooks]
commit=
@@ -153,6 +153,10 @@
hg qgoto mqtest.diff
echo % cat
cat c
+echo % hg cat
+hg cat c
+echo % keyword should not be expanded in filelog
+hg --config 'extensions.keyword=!' cat c
echo % qpop and move on
hg qpop
--- a/tests/test-keyword.out Wed Apr 28 11:10:58 2010 -0300
+++ b/tests/test-keyword.out Mon Apr 26 03:54:18 2010 +0200
@@ -158,6 +158,12 @@
% cat
$Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
tests for different changenodes
+% hg cat
+$Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
+tests for different changenodes
+% keyword should not be expanded in filelog
+$Id$
+tests for different changenodes
% qpop and move on
popping mqtest.diff
patch queue now empty
@@ -208,7 +214,7 @@
[extensions]
keyword =
[keyword]
-* =
+** =
b = ignore
demo.txt =
[keywordmaps]