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.)
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
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.
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
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
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.
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.
http://www.pixelbeat.org/scripts/idiff is just avesome filter:
svn diff | idiff
It is somewhat convoluted and involves writing a wrapper script to emulate the diff and diff3 tools
Here is more info about it.
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.
精彩评论