[PATCH 5 of 6] simplemerge: add ``base`` mode to ``mergemarkersscope`` config

Long Vu long.vu at intelerad.com
Fri Jul 25 10:17:59 CDT 2014


On Fri, Jul 18, 2014 at 11:36 PM, Matt Mackall <mpm at selenic.com> wrote:
>
> Except it's supposed to look like this:
>
> $ merge -p -A local base other
> <<<<<<< local
> 1
> 2
> 3
> 6
> 8
> ||||||| base
> One
> Two
> Three
> Four
> Five
> =======
> 1
> 2
> 3
> 4
> 5
>>>>>>>> other
> merge: warning: conflicts during merge

I agree with the format proposed by Matt.  That is the format used for diff3.

>
> This would be better as something like internal:merge3way.

Defining a new merge tool "internal:merge3way" is also a more natural
way for those who has been explicitly specifying their merge tool.
The behavior for internal:merge is kept as is and no backward
compatible behavior is introduced.

I've been configuring diff3 as merge tool this way:

# don't attempt internal:merge first
diff3.premerge = False
diff3.args = -L local -L base -L other $local $base $other -m > $output

I have to say that having the base marker for internal:merge is
something I've always wanted to add but never found the time, hence
resorting to use diff3 as merge tool.

Kudos for the patch.

Having the base marker not only make graft or rebase merge conflict
easier to handle but also help for "normal" merge conflict.

The algorithm used is 3-way merge (based on 3 versions of the merge
hunks) so why at the time of manual conflict resolution, the user is
only given "other" and "local".  "base" was used together with "other"
and "local" by the merge engine to detect merge conflict, so normally
the user should also have the same infos as the merge engine to make
decision.

Again, kudosssssssss for the patch.


-- 
Long Vu | Build Controller | Intelerad | +1-514-931-6222 ext. 7743

-- 

This email or any attachments may contain confidential or legally 
privileged information intended for the sole use of the addressees. Any 
use, redistribution, disclosure, or reproduction of this information, 
except as intended, is prohibited. If you received this email in error, 
please notify the sender and remove all copies of the message, including 
any attachments.



More information about the Mercurial-devel mailing list