External diff/merge tools

John Arbash Meinel john at arbash-meinel.com
Fri Apr 9 21:55:44 BST 2010


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

Gaetano wrote:
> Hi,
> 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'
> 
> can anyone suggest to what I'm doing wrong?
> 
> thanks in advance
>  Gaetano 

It looks like running stuff on windows has some bugs. Probably it is a
bug between aliases or maybe --using and handling '/' in config.

What happens if you just do:

bzr diff --using c:/kdiff3/kdiff3.exe

How about:

set PATH=%PATH%;C:\kdiff3
bzr diff --using kdiff3.exe

Looking at the above, we seem to be trying to write to a debug file
based on the name of the program, but we aren't stripping '/' or '\\'
out of the name. Which is going to fail for a variety of reasons. (: is
not allow in paths at all, and '/' is going to try to put it in a subdir
which doesn't exist.)

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:]

We may need to do something similar for '/'.

I would think that something like that would at least get you closer. It
is also possible that the way we spawn processes won't like '/' in the
path, and we should be replacing them with '\'.

John
=:->



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

iEYEARECAAYFAku/lFAACgkQJdeBCYSNAANQVACfZqUfImUfJVe1+LliPLQf7k/4
eSsAnjY3avHC/gteT9aY0cQIHqrjZAWM
=cRDk
-----END PGP SIGNATURE-----



More information about the bazaar mailing list