KDIFF3 is a great graphical difference display utility – I use it a lot in my day job to compare the changes I have made with the changes checked in to ClearCase.
But I use Subversion for my work in my secret identity as a web developer, and although KDIFF has ClearCase integration, it didn’t have any magic buttons for SVN integration.
I found a comment in this post though, that got me most of the way there, and then with a small modification got just what I wanted: the ability to type
diff filename.ext
and get the changes made from the last checked in copy. Here’s what you need to do:
1. Make sure KDIFF3 is on the path (C:\Program Files\KDIFF3)
2. Add the following to a batch file in the same dir called diff.bat
@svn diff -r HEAD %1 –diff-cmd kdiff3
(Note: That is a double dash before diff-cmd)
3. That’s it! There is no step 3.
Now, when you are working in your working copy and want to see the changes you’ve made to a file, just type
diff filename.txt
Enjoy!