Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to svn diff using meld

Tags:

linux

svn

meld

I want to use meld to view the difference between revisions. I installed meld and then executed in the project directory:

svn diff -r 2165:2182 --diff-cmd meld

but it thows up the following error:

Index: app/models/college_friends_count.rb
===================================================================
svn: E200012: Process 'meld' failed (exitwhy 2)

Can anybody tell me what is going wrong here?

like image 517
aash Avatar asked Jun 20 '12 07:06

aash


1 Answers

I believe E200012 means the underlying process (meld) exited with a non-zero exit code. Lots of diff tools do this to indicate the result of the diff operation (0 = no difference 1 = differences, etc).

Though my version of meld doesn't appear to use non-zero exit codes, I know colordiff does, which halts SVN during a directory-crawling "svn diff", like in your example above. Try it on a file that doesn't have any changes to test.

A good fix is to to make your own diff command, let's say you call it meld_svn:

#!/bin/bash
meld "$6" "$7" 
exit 0

So what we're doing is ignoring meld's exit codes, and exiting with our own (which won't stop SVN). The quotes around the arguments mean that filenames with spaces in them won't break your script.

Make it executable, then edit your ~/.subversion/config and set the diff-cmd to "meld_svn". This works great for colordiff, should fix your problem with meld if meld's indeed exiting with non-zero exit codes.

I hope that helps.

like image 118
Greg Avatar answered Oct 16 '22 13:10

Greg