Test potential import conflict
authorChristian Ebert <blacktrash@gmx.net>
Fri, 21 Dec 2007 00:42:09 +0100
changeset 316 98656ffb1cec
parent 315 c1ec4ffd1279
child 317 b18631f0dbdc
Test potential import conflict
tests/test-keyword
tests/test-keyword.out
--- a/tests/test-keyword	Fri Dec 21 00:40:25 2007 +0100
+++ b/tests/test-keyword	Fri Dec 21 00:42:09 2007 +0100
@@ -173,7 +173,24 @@
 # remove path to temp dir
 hg incoming | sed -e 's/^\(comparing with \).*\(test-keyword.*\)/\1\2/'
 
+sed -i.bak -e 's/Id.*/& conflicttest/' a
+rm a.bak
+echo % commit conflicttest
+hg --debug commit -m'conflict?' -d '3 0' -u 'User Name <user@example.com>'
+echo % export
+hg export -o ../conflicttest.diff tip
+
 cd ../Test
+echo % import
+hg import ../conflicttest.diff
+echo % cat
+cat sym a b
+echo
+echo % rollback
+hg rollback
+echo % clean update
+hg update --clean
+
 echo % kwexpand/kwshrink on selected files
 mkdir x
 echo % copy a x/a
--- a/tests/test-keyword.out	Fri Dec 21 00:40:25 2007 +0100
+++ b/tests/test-keyword.out	Fri Dec 21 00:42:09 2007 +0100
@@ -40,10 +40,6 @@
 like CVS' $Log$, are not supported. A keyword template map
 "Log = {desc}" expands to the first line of the changeset description.
 
-Caveat: "hg import" fails if the patch context contains an active
-        keyword. In that case run "hg kwshrink", and then reimport.
-        Or, better, use bundle/unbundle to share changes.
-
 list of commands:
 
  kwdemo     print [keywordmaps] configuration and an expansion example
@@ -264,6 +260,27 @@
 date:        Thu Jan 01 00:00:02 1970 +0000
 summary:     firstline
 
+% commit conflicttest
+a
+overwriting a expanding keywords
+% export
+% import
+applying ../conflicttest.diff
+% cat
+expand $Id: a 70a392d4a4e4 Thu, 01 Jan 1970 00:00:03 +0000 user $ conflicttest
+do not process $Id: conflicttest
+xxx $
+$Xinfo: User Name <user@example.com>: conflict? $
+expand $Id: a 70a392d4a4e4 Thu, 01 Jan 1970 00:00:03 +0000 user $ conflicttest
+do not process $Id: conflicttest
+xxx $
+$Xinfo: User Name <user@example.com>: conflict? $
+ignore $Id$
+
+% rollback
+rolling back last transaction
+% clean update
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 % kwexpand/kwshrink on selected files
 % copy a x/a
 % kwexpand a