[PATCH] merge: improve conflict markers by pointing to introrev

timeless timeless at gmail.com
Wed Mar 9 09:57:37 EST 2016


On Wed, Mar 9, 2016 at 9:36 AM, Simon Farnsworth <simonfar at fb.com> wrote:
> His objection is that introrev and merge parent are both random points; introrev is the last commit to change the file in conflict, not necessarily the commit (or commits) that caused the conflict. Using introrev runs the risk of increasing user confusion because it increases the sense that the conflict marker is telling you about the commit that caused the conflict.
>
> For reference, a current default set of conflict markers looks like:
> <<<<<<< local: 7c459574949d tag book branch - user: commit 7c459574949d description first line
> =======
>>>>>>>> other: 6de9c4bc3d38 tag book branch - user: commit 6de9c4bc3d38 description first line
>
>
> We agreed that the cause of the confusion is that the "user: commit description first line" section; it gives the impression that the commit you're being pointed at is the commit that causes the conflict, right up until you hit a merge where that's not true and get confused (to the point where I've had users tell me that git's behaviour is better - yet git does the same as current hg).
>
> My thought is that we should change this, so a default set of commit markers look like:
> <<<<<<< local: merging 7c459574949d tag bookmark branch - last change 4dbc2cd1399a
> =======
>>>>>>>> other: merging 6de9c4bc3d38 tag bookmark branch - last change 00025129f739
>
>
> The idea is that by only giving you locations, and not details, you won't feel that the conflict marker is telling you about the commit that caused the conflict, but instead is giving you locations to help you find out why there's a conflict here.

I like this. It's what I moved histedit to.
I have half a mind to do something similar for rebase (although there
are other things I'm considering first, and it isn't a priority).


More information about the Mercurial-devel mailing list