Better merge tool integration
A. S. Budden
abudden at gmail.com
Thu Jul 1 08:31:28 BST 2010
On 1 July 2010 01:59, Gordon Tyler <gordon.tyler at gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> I'm working on bug 489915 (https://bugs.launchpad.net/bugs/489915) to
> improve bzr's integration with external merge tools like kdiff3, meld, etc.
>
> My plan is:
>
> 1. Create a mergetools module in bzrlib which provides an API for
> configuring and invoking external merge tools.
> 2. Add 'bzr' commands for configuring and invoking the tools.
> 3. Modify qconflicts to use the mergetools module for invoking the tools.
> 4. Modify qconfig to use the mergetools module for configuring the tools.
>
> The configuration stored is pretty simple: just a commandline with the
> same substitution markers as bzr-extmerge (%b, %t, %o, %r, %T). Quotes
> are supported so stuff like "C:\Program Files\KDiff3\kdiff3.exe" will work.
>
> The mergetools API will allow querying whether the merge tool is
> available (is the path to the executable correct or is it available on
> the path?) and the "name" of the tool (i.e. the basename of the
> executable) for UI purposes.
>
> The reason it has an availability check is that I want to provide a
> default set of tools in the configuration that might be available on the
> path, and the UI would indicate which of these particular merge tools
> are available and pre-configured for use. The user would just have to
> pick the one they want to use as their default. They could also
> customize a particular merge tool to set the path to the executable if
> it cannot be found on the path (mostly for Windows).
>
> Any thoughts or ideas on improvements?
Thank you for working on this: it will be really nice to see an
improvement in this area. The one suggestion I would have is to also
think about diff integration as well as merge integration. If you use
qbzr's diff tool, it opens all the files that have changed in one
window. If you diff using an external GUI tool, it opens the diff
tool for the first file, waits for the diff tool to close, opens the
diff tool for the second file, waits for it to close etc etc etc. It
can be very tedious. Diffuse (http://diffuse.sourceforge.net)
supports opening multiple tabs for multiple diffs (e.g. diffuse
file1.c.ver1 file1.c.ver2 -t file2.c.ver1 file2.c.ver2 -t file3.c.ver1
file3.c.ver2) all in one go, so having to keep opening and closing
diffuse to get to the right file can be very frustrating.
I've tended to work round it in the past by getting multiple copies of
the source code (at different versions) and doing a folder diff
excluding the .bzr directory, but this is very tedious and not very
user-friendly.
Al
More information about the bazaar
mailing list