Using kompare to view Subversion differences

When you’re using Subversion (svn) repositories for code development, it is sometimes useful to check differences between code revisions (i.e. when things went wrong for the first time). If you are using KDE, Kompare is a graphical difference viewer that can be easily used for this task. Simply run

svn diff -r 1020:1047 | kompare -o -

in a directory that belongs to the svn tree. Kompare window will open showing comparison of all the changed files in that directory tree. The numbers refer to revision numbers, i.e. in this case revisions 1020 and 1047 are being compared. The revision switch -r accepts other formulations, too:

'{' DATE '}' revision at start of the date
'HEAD' latest in repository
'BASE' base rev of item's working copy
'COMMITTED' last commit at or before BASE
'PREV' revision just before COMMITTED

For more information on the svn difference command run svn -h diff.

%d bloggers like this: