Making "bzr diff" call an external GUI diff program.

Wouter van Heyst larstiq at larstiq.dyndns.org
Sun Dec 11 10:58:14 GMT 2005


On Sun, Dec 11, 2005 at 08:50:09PM +1100, Erik de Castro Lopo wrote:
> Hi all,
> 
> I'd like to be able to make the "bzr diff" command use an external
> GUI diff viewer.

bzr diff --diff-options allows you to call external diff, but not an
arbitrary one, yet.

> I've had a look at mpool's vimdiff plugin and that is useful but it
> does allow the flexibility "bzr diff".
> 
> I've also had a look at bzrlib/diff.py but it doesn't seem at all
> easy to modify that to whats needed.
> 
> Does anyone have any suggestions on how to proceed?

I'd start at bzrlib/diff.py:external_diff, and make the external diff
program configurable instead of hardcoded:

        diffcmd = ['diff',
                   '--label', old_filename+'\t',
                   oldtmpf.name,
                   '--label', new_filename+'\t',
                   newtmpf.name]

Wouter van Heyst




More information about the bazaar mailing list