Updating Leopard's Pre-Installed Subversion

OSX Leopard ships with Subversion 1.4.x by default. Since then there have been at least 2 major upgrades.  Here's the how to update Leopard's pre-installed copy of subversion.

I recommend downloading two Subversion tools:

1. The SCPlugin from Tigis.org http://scplugin.tigris.org/

    SCPlugin integrest with the Finder in Mac OS X and provides contextual menu to common svn commands.  Like TortoiseSVN on Windows.

2. Latest build of SVN commandline tools from CollabNet


Step by Step:

1. Download and install the latest universal binary from CollabNet

    The installer puts everything into /opt/subversion and creates symbolic links in /usr/local/bin but this doesn't disable the pre-installed copy in /usr/bin.

2. Open your Terminal and check which version of SVN you are using by typing svn --version. This should say 1.4.x

3. Check which installed instance of SVN the OS is using by typing which svn. This will return the path to the SVN version you are using, which probably is /usr/bin/svn

4. Verify that the Collab.net version is installed by going to it: cd /opt/subversion/bin. Doing an ls should show you the subversion files.

5. Backup the current svn location: by going to it (cd /usr/local/bin) and copying it to your desktop or wherever you fancy (mv svn* ~/Desktop/)

6  Now you have two options:

6.1 Add the path the Collab.net binaries to your environment.  Add the following to .bash_profile if you are using the default bash shell:

    export PATH=/opt/subversion/bin/:$PATH

6.2 Create symlinks to the Collab.net binaries:

    ln -s /opt/subversion/bin/svn svn

    ln -s /opt/subversion/bin/svnadmin svnadmin

    ln -s /opt/subversion/bin/svndumpfilter svndumpfilter

    ln -s /opt/subversion/bin/svnlook svnlook

    ln -s /opt/subversion/bin/svnserve svnserve

    ln -s /opt/subversion/bin/svnsync svnsync

    ln -s /opt/subversion/bin/svnversion svnversion

7.  Done.

Copyright © 2008-2012 Irongeek Software, LLC.  support@irongeeksoftware.com