Three-way merge
Windows visual diff and merge for files and directories
Brought to you by:
christianlist,
grimmdp
For version control "merges", it would be REALY, REALLY
helpful to have the ability to synchronize an unmodified
file with a modified file, and then apply the changes to a
third file. This type of functionality forms the basis for
parallel code development (ala diff3). Many file
comparison / merge tools support three-way diffs,
although many of them do not actually support the
required functionality of:
apply "B" - "A" to "C"
Logged In: YES
user_id=631874
Yes, 3-way merge would be nice.
Its however a lot of work to add. Most of WinMerge code
assumes left/right files so all that code must be rewritten
first. Diffengine code must be updated to newest diffutils
supporting diff3. And last UI figured out for 3-way merge.
Setting resolution to later since we need a lot of other
work happen first.
Logged In: YES
user_id=544867
Originator: NO
This should be a higher priority.
Logged In: YES
user_id=631874
Originator: NO
I can up the priority when somebody promises to implement this (which is a lot of work, rewriting basics of WinMerge). Not forgetting it probably breaks lots of things in current two-way compare.
So, currently it is way better to have a good two-way compare than poor 3-way and buggy 2-way compares.
Logged In: YES
user_id=923664
Originator: NO
Note that
* 3 Way Diff/Merge (like in kdiff3 for example) and
* apply B-A to C
is not the same. For example, when B and A are similar, but C is
quite different, then the 3-way-merge is not so well defined.
When I had this in one case, I got the better result with the 2nd method,
which first creates an intermediate representation (can be regular
"diff" file), and then apply exactly these changes to C.
When I used 3-way-merge, the result was not so good, my file got messed up a bit
(maybe it was also my mistake, but generally I don't trust "3-way-merge" so much).
So, what would be needed is a tool to
* create B-A as diff file (easy: use regular "diff"), and
* apply that patch (half manually, in GUI, for conflict resolution where needed)
See also my feature request: "Graphical Patch Apply Mode" / 1768001.
Maybe that could be the future direction of development for support of 3-way-merge
in WinMerge...
Logged In: YES
user_id=512419
Originator: NO
Just wanted to add my voice here... I think three-way merging is the only left reason why anyone should prefer Araxis Merge (the "expensive" edition) to WinMerge yet...
WinMerge is the most intuitive, clean, functional, and user-friendly compare/merge tool in existence. The single most important MISSING feature, of course, is three-way compare/merge.
Note: As xurux mentions, all 3-way merge algorithms are not equal! It would certainly be nice if WinMerge offered a choice of merge algorithms, but I think the typical approach employed by most of the commercial tools out there would be just fine.
The traditional approach to 3-way merging, as I understand it, involves designating one file as the "Ancestor". The "left" and "right" file are then compared to the ancestor file independently. Atomic merges may then be made in any of four directions:
- Left to Ancestor
- Right to Ancestor
- Ancestor to Left
- Ancestor to Right
I don't really see this being vastly more technically challenging, as internally, it could be as simple as performing three independent two-way merges. I do all my merges manually (I don't trust even the best of auto-merging algorithms to not screw up my code) anyway, so all I care about it just seeing the actual differences between the three files side-by-side.
It has been almost two years since last comment on this issue, and there are almost 10 years since this feature was first requested. Is there any chance that in the future this feature is incorporated? Because I agree with Brian, this is the most important missing feature!
I've been pointed out to this unofficial fork, which has 3-way merge support.
http://www.geocities.co.jp/SiliconValley-SanJose/8165/unofficial_winmerge_nightly_builds.html
I wonder if the project maintainers plan to integrate these changes, if not - why?
Because there are no active project maintainers!
Too bad, hopefully somebody will step up one day :)
WinMerge 2.14.0 + 3-way merge, image compare/merge
https://bitbucket.org/jtuc/winmerge2011/commits/all
https://github.com/sdottaka/winmerge-v2-jp/releases
https://bitbucket.org/sdottaka/winmerge-v2