[PATCH] merge: implement --tool arguments using new ui.forcemerge configurable

Steve Borho steve at borho.org
Wed Oct 20 10:10:42 CDT 2010


On Tue, Oct 19, 2010 at 11:05 PM, Steve Borho <steve at borho.org> wrote:
> # HG changeset patch
> # User Steve Borho <steve at borho.org>
> # Date 1287545632 18000
> # Node ID 225749b41c56e787fdbc810fb6d8837ccb4084a8
> # Parent  c3316b6a32198a2a8257691a1233a9231222e503
> merge: implement --tool arguments using new ui.forcemerge configurable
>
> ui.forcemerge is set before calling into merge or resolve commands, then unset
> to prevent ui pollution for further operations.
>
> ui.forcemerge takes precedence over HGMERGE, but mimics HGMERGE behavior if the
> given --tool is not found by the merge-tools machinery.  This makes it possible
> to do:  hg resolve --tool="python mymerge.py" FILE
>
> With this approach, HGMERGE and ui.merge are not harmed by --tool

If no-one objects, I'll push this later this afternoon.

Grepping through the tests for HGMERGE was an eye opening experience
for just how many commands _can_ perform merges.

Ones I didn't think about but probably should have:

* rebase
* backout
* qpush (test-mq-merge.t, is this usage deprecated?)

Do we want --tool arguments for rebase and backout?

I'm going to stick: 'ui.merge = internal:fail' in all of my configs
and begin dog-fooding the resolve oriented merge work flow.

-- 
Steve Borho


More information about the Mercurial-devel mailing list