What do people feel about applying this patch (from the FreeBSD port) to trunk?
[[[
http://svn.freebsd.org/ports/head/devel/subversion/files/extra-patch-3way-conflict-markers (mod_dav_svn)
https://svnweb.freebsd.org/ports/head/devel/subversion/files/extra-patch-3way-conflict-markers?view=log (viewvc)
(and mentioned previously in context of custom keywords: <http://mid.gmane.org/20100922180752.GJ25159@ted.stsp.name>)
diff -ruN subversion/libsvn_wc/merge.c subversion/libsvn_wc/merge.c
--- subversion/libsvn_wc/merge.c 2011-08-06 19:15:44.000000000 +0400
+++ subversion/libsvn_wc/merge.c 2011-09-07 21:47:19.000000000 +0400
@@ -413,7 +413,7 @@
target_marker,
right_marker,
"=======", /* separator */
- svn_diff_conflict_display_modified_latest,
+ svn_diff_conflict_display_modified_original_latest,
pool));
SVN_ERR(svn_stream_close(ostream));
]]]
All it does is change the contents of conflict files in --accept=postpone mode:
it causes conflict markers to be rendered not as two sides
<<<<<<
mine
======
theirs
>>>>>>
but as three sides
<<<<<<
mine
||||||
original
======
theirs
>>>>>>
.
I find the latter style much easier to work with --- it is easier for me to
"Apply diff(ORIGINAL, THEIRS) to MINE" than to "Compare (MINE, THEIRS) and
sort out which parts of the delta to keep and which to reverse".
Does this break compatibility somehow? Scripts have the foo.c.{mine,theirs,
merged} files to work with. As to users, they may already be familiar with the
three-way syntax since the interactive conflicts resolver generates it[1]; if
not, the book could explain the |||||| block like it explains <<<<<< and >>>>>>.
Daniel
[1] The interactive conflicts resolver generates three-way diffs in the 'dc'
(display-conflicts) command:
[[[
wc/trunk% svn merge ../branch
Conflict discovered in 'foo'.
Select: (p) postpone, (df) diff-full, (e) edit,
(mc) mine-conflict, (tc) theirs-conflict,
(s) show all options: dc
<<<<<<< MINE (select with 'mc') (1)
foo on trunk
||||||| ORIGINAL (1)
foo
=======
foo on branch
>>>>>>> THEIRS (select with 'tc') (1)
]]]
The inclusion of the "foo\n" version makes the conflict easier to
resolve.
Received on 2014-04-07 10:35:33 CEST