filemerge: use non-minimal conflict marker regions (BC)
authorMatt Mackall <mpm@selenic.com>
Fri, 18 Jul 2014 21:49:52 -0500
changeset 21921 ecc1387138ba
parent 21920 1d04d3fe616d
child 21922 50e20154cb68
filemerge: use non-minimal conflict marker regions (BC) As extensively detailed by Pierre-Yves[1], simplemerge's minimal markers can result in hopeless confusion for many common merges. As it happens, we accidentally inherited this behavior when we borrowed simplemerge from bzr; it is not the behavior used by RCS's merge(1), Since merge(1) (and not bzr) is what we aim to emulate when emulating RCS's merge markers, we simply turn this feature off. This brings us in line with the behavior of CVS, SVN, and Git as a bonus. (NB: using conflict markers with Mercurial is discouraged.) [1] http://markmail.org/message/wj5mh3lc46czlvld convert glob tessa
mercurial/filemerge.py
tests/test-conflict.t
--- a/mercurial/filemerge.py	Mon Jun 09 03:49:07 2014 -0700
+++ b/mercurial/filemerge.py	Fri Jul 18 21:49:52 2014 -0500
@@ -217,7 +217,7 @@
 
         ui = repo.ui
 
-        r = simplemerge.simplemerge(ui, a, b, c, label=labels)
+        r = simplemerge.simplemerge(ui, a, b, c, label=labels, no_minimal=True)
         return True, r
     return False, 0
 
--- a/tests/test-conflict.t	Mon Jun 09 03:49:07 2014 -0700
+++ b/tests/test-conflict.t	Fri Jul 18 21:49:52 2014 -0500
@@ -47,13 +47,16 @@
 
   $ cat a
   Small Mathematical Series.
+  <<<<<<< local: 618808747361 - test: branch2
   1
   2
   3
-  <<<<<<< local: 618808747361 - test: branch2
   6
   8
   =======
+  1
+  2
+  3
   4
   5
   >>>>>>> other: c0c68e4fe667  - test: branch1
@@ -78,13 +81,16 @@
 
   $ cat a
   Small Mathematical Series.
+  <<<<<<< local: test 2
   1
   2
   3
-  <<<<<<< local: test 2
   6
   8
   =======
+  1
+  2
+  3
   4
   5
   >>>>>>> other: test 1
@@ -105,13 +111,16 @@
 
   $ cat a
   Small Mathematical Series.
+  <<<<<<< local: test 2
   1
   2
   3
-  <<<<<<< local: test 2
   6
   8
   =======
+  1
+  2
+  3
   4
   5
   >>>>>>> other: test 1
@@ -145,13 +154,16 @@
 
   $ cat a
   Small Mathematical Series.
+  <<<<<<< local: 123456789012345678901234567890123456789012345678901234567890\xe3\x81\x82... (esc)
   1
   2
   3
-  <<<<<<< local: 123456789012345678901234567890123456789012345678901234567890\xe3\x81\x82... (esc)
   6
   8
   =======
+  1
+  2
+  3
   4
   5
   >>>>>>> other: branch1
@@ -172,13 +184,16 @@
 
   $ cat a
   Small Mathematical Series.
+  <<<<<<< local
   1
   2
   3
-  <<<<<<< local
   6
   8
   =======
+  1
+  2
+  3
   4
   5
   >>>>>>> other