Svn – How to correctly install Subversion in Mac OS X

mac-osxsvn

A task has emerged to install latest subversion for a group of mac os x users (latest mac os version). I have tried first to install it manually from subversion.tigris.org, 'opencollabnet binary' (http://downloads.open.collab.net/binaries.html, "Universal Subversion 1.6.3 Binaries for MAC OS X (32 and 64 bit)"). It installed ok via .pkg installer, but after using 'svn' command I was surprised to see an old 1.4.4 version bundled with macos.

It seems, that installing new subversion does not replace an old one. What is a 'correct' way to ensure that 'svn' command always uses newly installed subversion? I can create a symlink or add /opt/bla-bla-bla/subversion to path, but I'm afraid that such crude hacking can break something.

Best Answer

You'll need to prepend the /opt/subversion version in the shell's path to have the environment prefer the new version.

The software's README states:

Installation Notes

<snip>

Once installed, you will need to prepend /opt/subversion/bin to your PATH environment variable.
This can be done a multitude of ways but an easy one is to add the following to the end of /etc/profile or ~/.profile:

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