SVN on OS X – /usr/bin or /usr/local/bin

I recently installed the openCollabNet OS X Universal binary for SVN 1.5.4 from Tigris and found something odd. I had installed the openCollabNet binary for 1.4.4 a while back, and don’t recall changing any install paths, but apparently something changed. After installing I ran svn –version and saw something that I shouldn’t have seen:

svn, version 1.4.4 (r25188)
compiled Sep 23 2007, 22:32:34

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see
This product includes software developed by CollabNet (http://www.Collab.Net/).

Strange, I should have seen the new 1.5.4 there. So I did a bit of digging. Everything I saw about the openCollabNet binary said it installed in /usr/local/bin, but when I ran which svn I saw /usr/bin/svn. So I looked in /usr/bin and /usr/local/bin. Sure enough, two installs in two different places. Not being one to do anything rash (like deleting svn from /usr/bin and then changing the path on all my tools that rely on it) I decided the best thing to do was fix it in a way that was reversible. So, I fired off a sudo ls (to get my password in scope in the shell) and then a simple

for i in `ls /usr/bin/svn*`; do mv /usr/bin/$i /usr/bin/$i.old && ln -sf /usr/local/bin/$i /usr/bin/$i; done

Once I had fired off that command another call to svn –version revealed the fix:

svn, version 1.5.4 (r33841)
compiled Oct 27 2008, 11:19:10

Copyright (C) 2000-2008 CollabNet.
Subversion is open source software, see
This product includes software developed by CollabNet (http://www.Collab.Net/).

I am still a little confused as to how 1.4.4 ended up in /usr/bin while 1.5.4 went to /usr/local/bin (where it is expected to go from the openCollabNet binary installer). I wondered, did I change the install path at some point in the install? Somehow I doubt it, as that is not a change I would be likely to make. Just another little mystery for the unsolved cases file.

2 Responses so far

  1. 1

    Steve said,

    February 15, 2009 @ 7:14 pm

    I think that by default (or perhaps with the Developer Tools install), OSX itself installs a copy of SVN 1.4.4 at /usr/bin/svn (that’s where it lives on my mac, and I’ve never explicitly installed it).

    If you installed the openCollab 1.4.4 without realising you already had it installed at /usr/bin/svn, then your openCollab install probably DID install to /usr/local/bin (you just never ran it), and it was then overwritten by your 1.5.4 install.

    Just a thought.

    Cheers, S.

  2. 2

    Sjan Evardsson said,

    February 16, 2009 @ 7:45 am

    Thanks, Steve. I wasn’t aware of that. I actually installed Developer Tools long after I installed the openCollabNet svn, so that is likely what happened.

    Another interesting point, SCPlugin does not play nice with 1.5.4, and I don’t know why. I tried uninstalling and re-installing but it still gives me the “Client version too old” whenever I right-click on a folder containing an svn repo. So for now I am going with svnX.

Comment RSS