How to Svn Diff Using Meld

Using Meld as external diff tool with Tortoise SVN

  1. Download meld from http://sourceforge.net/projects/meld-installer/

  2. Unpack the downloaded zip archive into "Program Files" or wherever you want it to be installed. This will create two folders, named "meld" and "python".

  3. Start "meld.exe" from the "meld" folder. If you get a Meld window opened, then you have installed Meld successfully.

  4. In TortoiseSVN, select Settings, then go to External Programs -> Diff Viewer on the left panel. In Configure the program used for comparing different revisions of files, browse to the Meld executable, "meld.exe", in your "meld" folder. Click on Apply.

That's it!

Sample Image

Sample Image

Sample Image

How to set up svn conflict resolution with meld?

First a warning! It is very easy to end up losing your local edits if you get this wrong! Test test test!

I'm afraid the script from pmod's link does not work with svn 1.6 (current in Ubuntu 11.04). Putting together code from pmod's link and here and advice here, I made this script that seems to work ok:

#!/usr/bin/env python
# svn merge-tool python wrapper for meld
import sys
import subprocess

try:
# path to meld
meld = "/usr/bin/meld"

# file paths
base = sys.argv[1]
theirs = sys.argv[2]
mine = sys.argv[3]
merged = sys.argv[4]

# the call to meld
# For older meld versions:
# cmd = [meld, mine, base, theirs, merged]
# New meld versions: >= 1.8.4
cmd = [meld, mine, base, theirs, '-o', merged]

# Call meld, making sure it exits correctly
subprocess.check_call(cmd)
except:
print "Oh noes, an error!"
sys.exit(-1)

Save this somewhere sensible (eg /usr/local/bin/svn-merge-meld.py) and make it executable:

sudo chmod +x /usr/local/bin/svn-merge-meld.py

Then edit ~/.subversion/config and uncomment the line merge-tool-cmd =, and set the path to your command.

Note that when a conflict occurs, you will be prompted what to do with it. You need to type a single l and for svn to run this script. When you've finished your merge, you need to type an r to resolve the conflict and copy the merged version to the working copy.

external diff tool meld not working with svn

looks like putting this line in the [helpers] section of the config file solved this issue !. I was putting this at the end of the config file under the [auto-props].

How do I get a pretty visual diff for svn?

The easiest way is to use an SVN client. It will enable additional functionality not available with command line SVN.

On Windows, I recommend TortoiseSVN. It allows integration with third party diff tools such as Araxis Merge.

Similar tools exist on other operating systems which allow you to do the same.

How to svn diff two files in different branch and from two specific revison?

usage :

svn diff --diff-cmd meld OLD-URL[@OLDREV] NEW-URL[@NEWREV]

reference :

svn help diff, 4-th form:

example :

 svn diff --diff-cmd meld http://server/project/branches/branch1/file1@15 http://server/project/branches/branch2/file1@27


Related Topics



Leave a reply



Submit