Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get external merge tools to work with svn on linux?

How do I get a GUI-based merge tool to work with command line SVN in linux? I understand that there are many options like meld, svn Diff, etc. out there. All of them require a helper script to allow svn to invoke the external program during conflict resolution. I followed the instructions given here and the nice svn manual with meld.

But in all cases, when I get to the merge conflict and type 'l' to invoke the external tool, I get an error: The external merge tool exited with exit code 255

I'm fairly certain I'm missing some key thing here. ITs too much of a coincidence for so many different solutions to fail. Would appreciate any solution or pointers to the problem.

Thanks!

like image 543
bobsaccamano Avatar asked Nov 29 '11 14:11

bobsaccamano


2 Answers

Also make sure that the path in your config is absolute. It should be the same path you see when you run a pwd command from that directory. No aliases or relative paths. So if your username is foo you would replace this line:

Add this below it: merge-tool-cmd = ~/bin/svn-merge-meld

With

Add this below it: merge-tool-cmd = /Users/foo/bin/svn-merge-meld

like image 183
geminiimatt Avatar answered Sep 29 '22 19:09

geminiimatt


You may not have the correct permissions on the wrapper script. Try something like this:

sudo chmod +x /usr/local/bin/mergewrap.py

I've found several wrapper scripts for vimdiff or meld which seem to pass the wrong number of arguments. Unless I've misunderstood the rather terse documentation about the commandline parameters, they only take 2 or 3 filenames. This may also cause the script to fail with an error.

like image 43
Carl Avatar answered Sep 29 '22 17:09

Carl