External diff/merge tools

Eli Zaretskii eliz at gnu.org
Sat Apr 10 07:53:50 BST 2010


> Date: Fri, 09 Apr 2010 15:55:44 -0500
> From: John Arbash Meinel <john at arbash-meinel.com>
> Cc: bazaar at lists.canonical.com
> 
> > I'm trying to configure bazaar to use an external diff/merge tool: KDiff3.
> > I have been reading tutorials and examples and it seems that all I need to
> > do is
> >  - install KDiff3 
> >  - add it to the path
> >  - modify bazaar.config adding the alias:
> >      [ALIASES]
> >      kdiff = diff --using c:/kdiff3/kdiff3.exe
> >    
> > I have also installed the extmerge  and difftools plugins
> > 
> > when I run:
> >  C:\development\myProject>bzr kdiff c:\development\myProject\..\MyFile.java
> > 
> >  I get the following error:
> > 
> >  bzr: ERROR: [Errno 22] Invalid argument:
> > 'c:\\docume~1\\ciotolag\\locals~1\\temp  
> >  \\bzr_c:/kdiff3/kdiff3.exex_1gfr.log'
> 
> What happens if you just do:
> 
> bzr diff --using c:/kdiff3/kdiff3.exe

I would also try the original steps, except with the alias defined
using backslashes:

  kdiff = diff --using c:\kdiff3\kdiff3.exe

That's because it's possible that the code which produces a .log file
name does not expect to see forward slashes on Windows.  (Which would
be a bug, but at least there would be a workaround.)

That's just a wild guess, of course.

> It at least looks like there is a 'mkstep()' or 'TemporaryFile(...)'
> line that is using the '--using' name, and should probably be replaced
> with something that strips everything up to a  final '/'. Something like:
> 
> def strip_prefix(path):
>   return path[path.rfind('/')+1:]

Careful: file name on Windows can have mixed forward and backslashes.
Something like 'd:/foo/bar\baz.exe'.  So "the final '/'" could be
either a '/' or a '\'.



More information about the bazaar mailing list