test-merge-tools: test ui.merge functionality and selection of internal tools
authorMads Kiilerich <mads@kiilerich.com>
Mon, 09 Mar 2009 18:44:44 +0100
changeset 7846 1cb6836946be
parent 7845 c2cd8d772805
child 7856 166b6b12df44
test-merge-tools: test ui.merge functionality and selection of internal tools
tests/test-merge-tools
tests/test-merge-tools.out
--- a/tests/test-merge-tools	Thu Mar 05 12:58:13 2009 +0200
+++ b/tests/test-merge-tools	Mon Mar 09 18:44:44 2009 +0100
@@ -104,6 +104,24 @@
 echo "# merge-patterns specifies executable with bogus path and gets warning:"
 domerge -r 2 --config merge-patterns.f=true --config merge-tools.true.executable=/bin/nonexistingmergetool
 
+echo
+echo ui.merge overrules priority
+echo
+
+echo "# ui.merge specifies false:"
+domerge -r 2 --config ui.merge=false
+
+echo "# ui.merge specifies internal:fail:"
+domerge -r 2 --config ui.merge=internal:fail
+
+echo "# ui.merge specifies internal:local:"
+domerge -r 2 --config ui.merge=internal:local
+
+echo "# ui.merge specifies internal:other:"
+domerge -r 2 --config ui.merge=internal:other
+
+echo "# ui.merge specifies internal:other but is overruled by pattern for false:"
+domerge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
 
 echo
 echo Premerge
--- a/tests/test-merge-tools.out	Thu Mar 05 12:58:13 2009 +0200
+++ b/tests/test-merge-tools.out	Mon Mar 09 18:44:44 2009 +0100
@@ -232,6 +232,90 @@
 ? f.orig
 
 
+ui.merge overrules priority
+
+# ui.merge specifies false:
+[merge-tools]
+false.whatever=
+true.priority=1
+true.executable=cat
+# hg update -C 1
+# hg merge -r 2 --config ui.merge=false
+merging f
+merging f failed!
+0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+use 'hg resolve' to retry unresolved file merges
+# cat f
+revision 1
+space
+# hg stat
+M f
+? f.orig
+
+# ui.merge specifies internal:fail:
+[merge-tools]
+false.whatever=
+true.priority=1
+true.executable=cat
+# hg update -C 1
+# hg merge -r 2 --config ui.merge=internal:fail
+0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+use 'hg resolve' to retry unresolved file merges
+# cat f
+revision 1
+space
+# hg stat
+M f
+
+# ui.merge specifies internal:local:
+[merge-tools]
+false.whatever=
+true.priority=1
+true.executable=cat
+# hg update -C 1
+# hg merge -r 2 --config ui.merge=internal:local
+0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+(branch merge, don't forget to commit)
+# cat f
+revision 1
+space
+# hg stat
+M f
+
+# ui.merge specifies internal:other:
+[merge-tools]
+false.whatever=
+true.priority=1
+true.executable=cat
+# hg update -C 1
+# hg merge -r 2 --config ui.merge=internal:other
+0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+(branch merge, don't forget to commit)
+# cat f
+revision 2
+space
+# hg stat
+M f
+
+# ui.merge specifies internal:other but is overruled by pattern for false:
+[merge-tools]
+false.whatever=
+true.priority=1
+true.executable=cat
+# hg update -C 1
+# hg merge -r 2 --config ui.merge=internal:other --config merge-patterns.f=false
+merging f
+merging f failed!
+0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+use 'hg resolve' to retry unresolved file merges
+# cat f
+revision 1
+space
+# hg stat
+M f
+? f.orig
+
+
 Premerge
 
 # Default is silent simplemerge: