Better merge tool integration

Gordon Tyler gordon.tyler at gmail.com
Thu Jul 1 03:46:27 BST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/30/2010 9:10 PM, Martin Pool wrote:
>> 1. Create a mergetools module in bzrlib which provides an API for
>> configuring and invoking external merge tools.
> 
> Maybe there should be some commonality with other external tools
> (editors, diff, etc).  But it may be better to do the specific case of
> merge first.

Agreed on both counts.

>> 2. Add 'bzr' commands for configuring and invoking the tools.
> 
> Can you tell us more about this?

I haven't actually given a lot of thought to the bzr commands yet since
I was coming at this from the qconflicts viewpoint. I had a vague idea
of an 'extmerge' command much like the bzr-extmerge plugin. Also, a
command to add or update a merge tool and a command to remove a merge
tool. Suggestions of good names for these commands and how to structure
them and their options would be appreciated. I was thinking merge tools
would be identified by the basename of their executable.

> I think the configuration should go into the generic config framework.

Agreed. I am loading it as a list of commandlines from the global bzr
config, i.e. GlobalConfig().get_user_option_as_list().

However, the actual UI for configuring can go a little further than just
a simple list of command lines. The MergeTool object from the mergetools
module allows the UI to extract/update the executable for
display/editing in a separate field from the arguments. The
is_available() indicator allows the UI to show (somehow) that the tool
is usable without further configuration and also to filter the list of
invokable tools to only those that are actually usable.

I have also provided a toplevel list of help texts for each substitution
marker, for use in the UI.

>> 3. Modify qconflicts to use the mergetools module for invoking the tools.
>> 4. Modify qconfig to use the mergetools module for configuring the tools.
> 
> .. and also regular command-line merge, remerge, conflicts, etc?

I thought that a separate command to invoke the external merge would be
the right way to do it. Do you have a different suggestion?

Thanks,
Gordon

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJMLAGDAAoJEIrPJfWinA2u13YH+wRQoaXbSZ/6K5qsaOUKosk+
CdcvczSTqsXl+GqyYhUC4YgrwcIz1MohdvslMPlb4t6iXe8JKv+k5j32NCvDm/+7
r6gKpFX+JX03/rlnw435HknIapmgRdXZhw0z3G04205IJX+gSAPb6/Tt9dSKKS7U
XSMwyAuPpZBTSl3KNClVJpa9Qk67y8rq7sgit7E6ZqaLS50G/oP4alRlgFeg/qTE
sDbQppixbP8vQclGMf6q2+5nqERRWrWXf/81vAhTZc9zOCpHZ9w3wW+q5ELsPDX8
7CPmLXs6qmiQ5zzRcI97B3VLxVhSSo3jZUGUM7JaFoqHXlgpg9S/JY1XwlIBPY8=
=Yqdf
-----END PGP SIGNATURE-----



More information about the bazaar mailing list