RFC: external tool to answer merge prompts (and others?)

Martin Geisler martin at geisler.net
Tue Jul 24 11:15:25 CDT 2012


Thomas Arendsen Hein <thomas at intevation.de> writes:

> Hi!
>
> In some situations the user will be prompted for decisions during
> merge, e.g.:
>
>  "local changed %s which remote deleted
>   use (c)hanged version or (d)elete?"
>
> To be able to automate giving non-default answers or use an external
> GUI tool when using frontends, a mechanism similar to the current
> [merge-tools] section could be created.

For JavaHg, we answer the manifest prompts using a default answer and
then presents a MergeContext object to the program that lets it revert
the answers if needed -- the merge context has methods to get all "keep
delete conflicts" and you can later ask a KeepDeleteConflict to keep or
delete the file in question.

This is all to done in an attempt to make JavaHg present an unified
interface in the same manner as 'hg resolve'.

So I feel that it's more important to roll the prompts into the merge
logic presented by 'hg resolve' -- Steve Borho had a patch for that a
long time ago.

> tool2 would open an interactive GUI to let the user decide what to do,
> using arguments instead of environment variables. TortoiseHG already
> does something like this by overriding ui.promptchoice, but e.g.
> MercurialEclipse always uses the default answer.

MercurialEclipse is on its way to use JavaHg, so I think it should work
fine for these prompts when its ported.

-- 
Martin Geisler

aragost Trifork
Commercial Mercurial support
http://aragost.com/mercurial/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120724/992d8b23/attachment.pgp>


More information about the Mercurial-devel mailing list