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

Yuya Nishihara yuya at tcha.org
Tue Mar 8 09:20:07 EST 2016


On Tue, 8 Mar 2016 13:24:02 +0000, Simon Farnsworth wrote:
> I'm reworking this so that conflict markers can access both the merge heads and the introrev to get you tags and bookmarks from both the merge side and the introrev. The issue this patch tries to address is that if you've got a large, fast moving, monolithic repository, the conflict markers are confusing (and we've had complaints that Mercurial doesn't get them right) - you're working on the backend C++ codebase, but (for some reason that's beyond you), you've got a conflict that references Android work only.

[snip]

> That's the goal of the extra revset predicates (separate patch series); by providing you with an easy route to find the three interesting points of a three way merge on a file (introrev of the local and other parts of the merge, and the base node), you have the tools to write a revset alias that gets you all the commits that touched unresolved files (for example):
> 
> With
> 
> [revsetalias]
> conflicts($1) = conflict("base",$1)::(conflict("other",$1) or conflict("local",$1)) and file($1)

FWIW, if a file name and conflict side are provided, conflict marker can be
build by a template expression.

  {revset("conflict(%s, %s)", conflictside, "path:{file}") % "{node|short}"}


More information about the Mercurial-devel mailing list