Neil G
Neil G

Reputation: 33282

How do I get a pretty visual diff for svn?

I want tkdiff (or something like it) to display my 'svn diff' so that I can switch files in the tkdiff interface itself.

(I'm using a mac.)

Upvotes: 32

Views: 42107

Answers (9)

nandeesh v
nandeesh v

Reputation: 127

When you type "svn help diff", you will get an option called "--diff-cmd ARG". Here is a simple example to use tkdiff to see the changes from the earlier version.

svn diff --diff-cmd tkdiff adc_ctrl.sv -r 768

Here, 768 is the svn revision number.enter image description here

Upvotes: 1

Thamaraiselvam
Thamaraiselvam

Reputation: 7080

Install ColorDiff

$ sudo apt-get install colordiff

Configure Subversion Client

Open up ~/.subversion/config in your favorite text editor, and search for this line:

# diff-cmd = diff_program (diff, gdiff, etc.)

Add this line right below it (I like keeping the default examples intact):

diff-cmd = colordiff

restart terminal and now you can see colorful svn diff

Upvotes: 5

andrej
andrej

Reputation: 4763

http://www.pixelbeat.org/scripts/idiff is just avesome filter:

svn diff | idiff

Upvotes: 2

minhas23
minhas23

Reputation: 9671

I am using Mac OS but same thing works for other Unix System(may be meld needed for them )

But in Mac, Just install tkdiff using macport or brew Like brew install tkdiff or sudo port install tkdiff

Then Simple type the following command in you SVN project folder.

svn diff --diff-cmd tkdiff

Upvotes: 9

hannes.koller
hannes.koller

Reputation: 351

If confined to a Linux console I find it very helpful to put the following function in my .bashrc

svndiff() { vimdiff <(svn cat "$1") "$1";  }

The command

svndiff MyFile.txt

will then open vimdiff and show you the differences side-by-side.

Upvotes: 3

JohnB
JohnB

Reputation: 19012

TortoiseSVN as many already have mentioned. It has a built in text file comparison app callled TortoiseMerge. But a more pretty text file compare tool is WinMerge, which if you install can integrate with TortoiseSVN. It's great even for non-SVN related file comparisons.

Upvotes: 2

Mark O&#39;Connor
Mark O&#39;Connor

Reputation: 78021

One windows I use TortoiseSVN, best SCM client on the planet.

On Linux the closest I can get is installing meld and running the following subversion command:

svn diff MyFile.txt --diff-cmd meld

Upvotes: 38

Andres
Andres

Reputation: 5187

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.

Upvotes: 13

Peter Tillemans
Peter Tillemans

Reputation: 35341

It is somewhat convoluted and involves writing a wrapper script to emulate the diff and diff3 tools

Here is more info about it.

Upvotes: 1

Related Questions