Skip to content

Instantly share code, notes, and snippets.

@ctkjose
Last active September 13, 2015 12:10
Show Gist options
  • Save ctkjose/94e47a26f8fbb908181e to your computer and use it in GitHub Desktop.
Save ctkjose/94e47a26f8fbb908181e to your computer and use it in GitHub Desktop.
SVN on OS X

Using FileMerge as Diff Tool

Create a svndiff.sh file

mkdir ~/bin/
cp /dev/null ~/bin/svndiff.sh
chmod +x ~/bin/svndiff.sh

Copy the contents the following commands to your svndiff.sh

#!/bin/sh
DIFF="/usr/bin/opendiff"

LEFT=${6}
RIGHT=${7}

$DIFF "$LEFT" "$RIGHT"

Change your "diff-cmd"

nano -w ~/.subversion/config

Find the line with "# diff-cmd = diff_program (diff, gdiff, etc.)" and changed to:

diff-cmd = /Users/ctk/bin/svndiff.sh

This option uses XCODE's opendiff. To learn more abour opendiff see its man page.

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/opendiff.1.html

Other common option uses fmdiff Tools

https://gist.github.com/cemckinley/6118300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment