# HG changeset patch # User FUJIWARA Katsunori # Date 1401954434 -32400 # Node ID 2668a78df8ba451fc0d43a161212b7ebd522cd68 # Parent e22cfd1ae97cbd9529ad32cae5670d877b344150 keyword: suppress keyword expansion while 'hg fetch' for internal merge Before this patch, 'hg fetch' may cause unexpected conflict, if 'hg fetch'-ed changes are located near lines in which keywords are embedded, because keywords are substituted with other strings in the working directory. This patch suppresses keyword expansion while 'hg fetch' for internal merge by adding 'fetch' to 'restricted' command list like 'merge'. This patch uses 'hg import' to safely create the new head to be merged at succeeding 'hg fetch', because: - branch of revision #10 is different from one of #11 in 'Test' repository, so just 'hg fetch -r 11' doesn't cause merging between them this means the new head should be created manually. - 'hg import' is easier and safer than 'cat < pick 01a68de1003a 13 9foobranch > EOF +Test restricted mode with fetch (with merge) + + $ cat <> $HGRCPATH + > [extensions] + > fetch = + > EOF + + $ hg clone -q -r 9 . ../fetch-merge + $ cd ../fetch-merge + $ hg -R ../Test export 10 | hg import -q - + $ hg fetch -q -r 11 + $ hg diff -r 9 a + diff -r 800511b3a22d a + --- a/a Thu Jan 01 00:00:00 1970 +0000 + +++ b/a * (glob) + @@ -1,4 +1,6 @@ + +foobranch + expand $Id$ + do not process $Id: + xxx $ + $Xinfo$ + +xxxx + $ cd ..