One option is to install the package via MacPorts or Homebrew. If you use Homebrew, you probably don’t have to do anything else, as Homebrew sets up the symlinks automatically. If you install via MacPorts, you have the same issue as you do with the Collabnet installer.
Instead of creating symlinks though, you can also change the PATH environment variable. To do this, open
~/.bashrc in your favourite editor (vim) and make sure that you have a line similar to this:
This will make sure that
/opt/local/bin/, which contains the MacPorts installs, will be checked before any other locations. MacPorts should add this by itself. This makes sure that svn as installed by MacPorts will be used.
As before: you can check which svn binary you are using by typing
which svn and
svn --version in the terminal.
Hope this helps!
OSX Leopard ships with Subversion 1.4.x by default. Since then, SVN has had 2 major upgrades (merge tracking anyone?). To make things easy, there is a binary available at Collab.net. But unfortunately you need to do some work yourself.
The path of the built in Subversion command line client is different to the one that the Collab.net Community binary is installed to. The following steps will fix this.
Disclaimer - Be careful: when you use the Terminal you are flying without a safety net! No undo & no restore from trash. Do this at your own risk and don’t forget to have an up-to-date backup!!!
- install the binary downloaded to Collab.net
- open your Terminal and check which version of SVN you are using by typing
svn --version. This should say 1.4.x
- 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
- check whether the Collab.net version is installed by going to it:
cd /opt/subversion/bin. Doing an
lsshould show you the subversion files
- 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/)
- now you need to 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
- That should be it
The beauty is that you only need to do this once. The next time you upgrade your Subversion client, the symlinks will just point to the updated files and everything should be fine. As I said earlier though: only do this if you feel comfortable on the command line.