Re: Automatic 3 way merge for conflicts



> I definitely don't want to be replacing text in MERGED with text in
> BASE. The only correct possibility here is to use ancestor information
> that already exists in MERGED, if it's there.
>
> In other words, if our MERGED file has diff3 conflict markers (rather
> than the more common two-way conflict markers), we can reasonably
> strip out the LOCAL and REMOTE parts of the conflict, which would
> reliably leave the portion derived from BASE. There's no need to
> actually consult BASE ourselves, or to make decisions about which
> chunk to use. We just need to be able to get a diff3 formatted
> conflict from the VC.
>

Fair enough. BTW, it would be awesome to see a way to run this new mode from
command line so that it can be used with git mergetool etc.
Something like:
meld LOCAL BASE REMOTE --output=MERGED --output_is_already_merged_switch
or
meld LOCAL MERGED REMOTE --base=BASE
And then:
1) show regular 3-way diff if MERGED contains no conflict markers
2) alter MERGED content and show 3-way diff if MERGED contains diff3
markers (maybe, but not necessarily, offer switching to auto-merge)
3) show regular 3-way diff if MERGED contains non-diff3 conflict
markers and offer switching to auto-merge

Regards,
Piotr


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]