changeset 6362:bc3dbdb1d430

imerge: replace "merge" with "internal:merge" when non-interactive
author Patrick Mezard <pmezard@gmail.com>
date Sun, 23 Mar 2008 20:37:02 +0100
parents 9b21faa6f013
children bbfebf751ac8
files hgext/imerge.py tests/test-imerge tests/test-imerge.out
diffstat 3 files changed, 20 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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