How to get external merge tools to work with svn o

2019-06-19 02:49发布

问题:

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!

回答1:

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



回答2:

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.