diff tests/test-keyword @ 10117:98867145f4b5 stable

keyword: go into restricted mode when transplanting Expanded keyword is read into diff with transplant -b otherwise. Test this scenario. Thanks to Adam Berkes for providing an example case.
author Christian Ebert <blacktrash@gmx.net>
date Wed, 23 Dec 2009 12:04:17 +0000
parents fc493cb90bb1
children 19c3fefdaec9
line wrap: on
line diff
--- a/tests/test-keyword	Wed Dec 23 12:04:04 2009 +0000
+++ b/tests/test-keyword	Wed Dec 23 12:04:17 2009 +0000
@@ -5,6 +5,7 @@
 hgext.keyword =
 hgext.mq =
 hgext.notify =
+hgext.transplant =
 EOF
 
 # demo before [keyword] files are set up
@@ -337,6 +338,23 @@
 hg commit -m localresolve
 cat m
 
+echo % test restricted mode with transplant -b
+hg update 6
+hg branch foo
+mv a a.bak
+echo foobranch > a
+cat a.bak >> a
+rm a.bak
+hg commit -m 9foobranch
+hg update default
+hg -y transplant -b foo tip
+echo % no expansion in changeset
+hg tip -p
+echo % expansion in file
+head -n 2 a
+hg -q rollback
+hg -q update -C
+
 echo % switch off expansion
 echo % kwshrink with unknown file u
 cp a u