Subversion diff

From HaFrWiki
Jump to: navigation, search

Contents

Using the diff command of subversion may be some troublesome. To use a compare program can overcome problems.

 > svn diff -r <revision number> <filename>

Is one of the easiest way to get the changes. To get in Beyond Compare look below.

BC[edit]

Using Subversion with Beyond Compare. Go into the Beyond Compare installation folder (eg, C:\Program Files\Beyond Compare 3).
Create a batch file named "svn.bat" with one line:

 "C:\Progra~1\Beyond~1\bcomp.exe" "%6" /title1=%3 "%7" /title2=%5

Go into Subversion's per-user configuration area, typically:

  • Windows 2000/NT/XP C:\Documents and Settings\<username>\Application Data\Subversion
  • Windows Vista C:\Users\Administrator\AppData\Roaming\Subversion

Edit "config" and change the following lines:

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

to:

 [helpers]
 diff-cmd = C:\Progra~1\Beyond~1\svn.bat

For Subversion running under Cygwin: Instead of using a batch file, create a file named "bc.sh" with the following line:

 "$(cygpath 'C:\Progra~1\Beyond~1\bcomp.exe')" `cygpath -w "$6"` `cygpath -w "$7"` /title1="$3" /title2="$5" /readonly

See also[edit]