imerge: replace "merge" with "internal:merge" when non-interactive
authorPatrick Mezard <pmezard@gmail.com>
Sun, 23 Mar 2008 20:37:02 +0100
changeset 6362 bc3dbdb1d430
parent 6361 9b21faa6f013
child 6363 bbfebf751ac8
imerge: replace "merge" with "internal:merge" when non-interactive
hgext/imerge.py
tests/test-imerge
tests/test-imerge.out
--- a/hgext/imerge.py	Sun Mar 23 18:52:02 2008 +0100
+++ b/hgext/imerge.py	Sun Mar 23 20:37:02 2008 +0100
@@ -120,7 +120,7 @@
         # this could be greatly improved
         realmerge = os.environ.get('HGMERGE')
         if not interactive:
-            os.environ['HGMERGE'] = 'merge'
+            os.environ['HGMERGE'] = 'internal:merge'
 
         # The filemerge ancestor algorithm does not work if self.wctx
         # already has two parents (in normal merge it doesn't yet). But
--- a/tests/test-imerge	Sun Mar 23 18:52:02 2008 +0100
+++ b/tests/test-imerge	Sun Mar 23 20:37:02 2008 +0100
@@ -46,6 +46,11 @@
 echo foo > foo2
 hg imerge save ../savedmerge
 
+echo % merge auto
+hg up -C 1
+hg --traceback imerge --auto
+cat foo2
+
 echo % load
 hg up -C 0
 hg imerge --traceback load ../savedmerge
--- a/tests/test-imerge.out	Sun Mar 23 18:52:02 2008 +0100
+++ b/tests/test-imerge.out	Sun Mar 23 20:37:02 2008 +0100
@@ -23,6 +23,20 @@
 merging foo and foo2
 all conflicts resolved
 % save
+% merge auto
+2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+(branch merge, don't forget to commit)
+merging foo2 and foo
+warning: conflicts during merge.
+merging foo2 failed!
+U foo2
+foo
+<<<<<<< local
+foo
+=======
+bar
+>>>>>>> other
 % load
 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
 2 files updated, 0 files merged, 0 files removed, 0 files unresolved