> -----Original Message----- > From: Daniel Shahaf [mailto:d...@daniel.shahaf.name] > Sent: maandag 7 april 2014 10:35 > To: dev@subversion.apache.org > Cc: Lev Serebryakov > Subject: Three-way merge markers by default > > 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.gj25...@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 > >>>>>>.
Note that while this gives complete information for update and switch, for merging there are actually 4 sides instead of 3... svn merge merges the difference between two files (left and right) into a third file (mine), which also happens to have an original version (its pristine version). So theoretically in case of an update and switch the older versions are the same file(left=pristine). The problem is now: Are you now showing left or pristine as original? Or what is "original"? The answer for update/switch is easy, but I don't think the per file merge code knows the difference between the operations. And I don't think our users will really understand. (I haven't found a merge tool that really uses all 4 versions except of some experimental code in our libraries) Bert