(0.9.2compat) add merge, resolve to restricted 0.9.2compat
authorChristian Ebert <blacktrash@gmx.net>
Fri, 22 Aug 2008 11:53:30 +0200
branch0.9.2compat
changeset 486 a6f4e1367978
parent 483 ad766066d1bc
child 489 f3514954d3c6
(0.9.2compat) add merge, resolve to restricted This is not really backwards compatible (test only as comment) and doesn't prevent extra conflicts with older Hg versions. On the other hand it doesn't do any damage either and provides the 3-way merge ease if possible.
hgkw/keyword.py
tests/test-keyword
--- a/hgkw/keyword.py	Thu Aug 21 19:07:33 2008 +0200
+++ b/hgkw/keyword.py	Fri Aug 22 11:53:30 2008 +0200
@@ -100,7 +100,7 @@
 
 # hg commands that trigger expansion only when writing to working dir,
 # not when reading filelog, and unexpand when reading from working dir
-restricted = 'record qfold qimport qnew qpush qrefresh qrecord'
+restricted = 'merge record resolve qfold qimport qnew qpush qrefresh qrecord'
 
 def utcdate(date):
     '''Returns hgdate in cvs-like UTC format.'''
--- a/tests/test-keyword	Thu Aug 21 19:07:33 2008 +0200
+++ b/tests/test-keyword	Fri Aug 22 11:53:30 2008 +0200
@@ -285,6 +285,31 @@
 #echo % errors encountered
 #cat errors.log
 
+#echo % merge/resolve
+#echo '$Id$' > m
+#hg add m
+#hg commit -m 4kw 
+#echo foo >> m
+#hg commit -m 5foo
+#echo % simplemerge
+#hg update 4
+#echo foo >> m
+#hg commit -m 6foo
+#hg merge
+#hg commit -m simplemerge
+#cat m
+#echo % conflict
+#hg update 4
+#echo bar >> m
+#hg commit -m 8bar
+#hg merge
+#echo % keyword stays outside conflict zone
+#cat m
+#echo % resolve to local
+#HGMERGE=internal:local hg resolve
+#hg commit -m localresolve
+#cat m
+
 echo % switch off expansion
 echo % kwshrink with unknown file u
 cp a u