Patchwork [5,of,7] mergetools: add a tests for premerge --keep

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 5, 2014, 12:28 a.m.
Message ID <04480d872e4d83132d6c.1407198491@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5261/
State Changes Requested
Headers show

Comments

Pierre-Yves David - Aug. 5, 2014, 12:28 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1407196215 25200
#      Mon Aug 04 16:50:15 2014 -0700
# Node ID 04480d872e4d83132d6c2d74d65261e4a2c5b1f7
# Parent  b0c16cbbbc404905e4a3c86129c944605f885355
mergetools: add a tests for premerge --keep

It works! No surprise

Patch

diff --git a/tests/test-merge-tools.t b/tests/test-merge-tools.t
--- a/tests/test-merge-tools.t
+++ b/tests/test-merge-tools.t
@@ -707,10 +707,43 @@  Default is silent simplemerge:
   revision 1
   space
   # hg stat
   M f
 
+.premerge=keep keeps conflict markers in:
+
+  $ beforemerge
+  [merge-tools]
+  false.whatever=
+  true.priority=1
+  true.executable=cat
+  # hg update -C 1
+  $ hg merge -r 4 --config merge-tools.true.premerge=keep
+  merging f
+  <<<<<<< local: ef83787e2614  - test: revision 1
+  revision 1
+  space
+  =======
+  revision 4
+  >>>>>>> other: 81448d39c9a0 - test: revision 4
+  revision 0
+  space
+  revision 4
+  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ aftermerge
+  # cat f
+  <<<<<<< local: ef83787e2614  - test: revision 1
+  revision 1
+  space
+  =======
+  revision 4
+  >>>>>>> other: 81448d39c9a0 - test: revision 4
+  # hg stat
+  M f
+
+
 Tool execution
 
 set tools.args explicit to include $base $local $other $output:
 
   $ beforemerge