[PATCH RFC] revset: add new predicates for finding merge revisions

Augie Fackler raf at durin42.com
Tue Mar 1 18:26:42 UTC 2016


On Mon, Feb 29, 2016 at 06:19:09PM +0000, Simon Farnsworth wrote:
> This patch isn't safe to apply as-is, because it introduces import loops.
>
> I can fix most of them by code motion, but there's one I'm stuck on,
> so sending this out for advice.
>
> Specifically, I can't work out a good way to break "Import cycle:
> mercurial.filemerge -> mercurial.templater -> mercurial.revset ->
> mercurial.merge -> mercurial.filemerge".
>
>
>
> filemerge needs templater because it uses templater to write
> conflict markers. In turn, templater needs revset because there's a
> revset template function. I want revset to pull in merge so that it
> can reuse merge's code for reading merge state.
>
> Am I best off creating a new mergestate.py file, and pulling merge
> state into there to break the loop? If not, have I missed something
> extremely obvious?

A mergestate.py file sounds reasoanble. Maybe give that a try.


More information about the Mercurial-devel mailing list