Disable expansion in mq directory; add test for qcommit
authorChristian Ebert <blacktrash@gmx.net>
Tue, 05 Feb 2008 08:04:50 +0100
changeset 365 e99ace93ded0
parent 364 d935536a6abc
child 367 7bc6c0e12464
Disable expansion in mq directory; add test for qcommit There might still be problems with qsave copied patch queues.
hgkw/keyword.py
tests/test-keyword
tests/test-keyword.out
--- a/hgkw/keyword.py	Fri Feb 01 00:48:37 2008 +0100
+++ b/hgkw/keyword.py	Tue Feb 05 08:04:50 2008 +0100
@@ -394,7 +394,7 @@
 
 
 def reposetup(ui, repo):
-    if not repo.local():
+    if not repo.local() or repo.root.endswith('/.hg/patches'):
         return
 
     inc, exc = [], ['.hgtags', '.hg_archival.txt']
--- a/tests/test-keyword	Fri Feb 01 00:48:37 2008 +0100
+++ b/tests/test-keyword	Tue Feb 05 08:04:50 2008 +0100
@@ -90,8 +90,12 @@
 echo % compare changenodes in a c
 cat a c
 
+echo % qinit -c
+hg qinit -c
 echo % qimport
 hg qimport -r tip -n mqtest.diff
+echo % qcommit
+hg qcommit -mqtest
 echo % keywords should not be expanded in patch
 cat .hg/patches/mqtest.diff
 echo % qpop
--- a/tests/test-keyword.out	Fri Feb 01 00:48:37 2008 +0100
+++ b/tests/test-keyword.out	Tue Feb 05 08:04:50 2008 +0100
@@ -163,7 +163,9 @@
 xxx $
 $Id: c,v ba4426d1938e 1970/01/01 00:00:01 user $
 tests for different changenodes
+% qinit -c
 % qimport
+% qcommit
 % keywords should not be expanded in patch
 # HG changeset patch
 # User User Name <user@example.com>