Subversion external diff tool

Posted by mklangeman on 2009-11-19 14:09
Forums: Komodo support | OS: Windows XP Pro

I've been trying to figure out how to setup Komodo IDE to use an external diff tool (WinMerge) but haven't been able to figure it out.

While I can check "Uses external diff tool", I am not able to pick the tool (which it appears you can with Perforce). And when I do the diff inside of Komodo nothing happens (no new window or message).

I've seen this thread: http://community.activestate.com/forum-topic/subversion-diff-using-exter...

I'm am using Komodo IDE 5.2 on Windows XP. Did the above patch get put into this version or didn't it make it in? Any help would be appreciated.

Thanks,
Matt

toddw
ActiveState Staff
Thu, 2009-11-19 14:29

You can setup Komodo to use WinMerge (as far as I understand), though it will take some steps (you'll need to create a special "svn_winmerge.bat" batch file), see here:
http://flimflan.com/blog/UsingWinMergeWithSubversion.aspx

Then you'd set Komodo's diff options to be:
--diff-cmd c:\path_to\svn_winmerge.bat

and also check Komodo's "Uses an external diff tool" option.

That get it working?

mklangeman | Fri, 2009-11-20 07:28

Great! Thanks Todd!

I was able to get this working with the following command in a bat file:

start "WinMerge" /B /WAIT "C:\Program Files\WinMerge\WinMergeU.exe" /e /ub /dl %3 /dr %5 %6 %7

For some reason adding the --diff-cmd c:\path_to\svn_winmerge.bat to the diff options did not work, but I used the bat file as the diff-cmd option in my subversion config [ C:\Documents and Settings\username\Application Data\Subversion\config ] and then it worked.

Thanks,
Matt

toddw
ActiveState Staff
Fri, 2009-11-20 12:10

Yes, I see what you mean there with the Komodo preferences.

It's actually a problem of "escaping", as Komodo passes the argument down to the Windows OS to run the command, but the "\" in the argument are treated as escape sequences. The workaround is to use double backslashes "\\" in the diff options textbox:

--diff-cmd c:\\path_to\\svn_winmerge.bat

Cheers,
Todd