Install and run SVN on OS X
December 18th, 2005
SVN useage and installation notes for OS X (only tested with Tiger).
You may need to have Developer Tools installed, or may prefer the convienience of DarwinPorts or Fink.
Download and install,
svnX (if you’d like a GUI).
- Once subversion is installed open a terminal and navigate to a directory in which you’d like to create a repository.
cd ~/Documents/Repositories/
1b. Export the path to subversion for your shell. I’ve got subversion installed in /usr/local/bin and in ~/.profile have the line export PATH="$PATH:/usr/local/bin"
- Run svnadmin to create a new repository.
svnadmin create helvector
- Open svnX, choose window > Repositories. In the window click + to add a new repository, Name name it and then enter its file path, eg
file://Users/simon/Documents/Repositories - Double click the repository in the list, this will launch the repository in it’s own window. You can now drag and drop existing files to the “root” in the lower half of the screen.
- Now it’s time to create a working copy. There’s two buttons in the window bar checkout and export. Export will allow you to export a version to a file path creating a copy of the repository which no longer has any association to it. Checkout does the same but keeps the files associated with the repository so you can then work with them – commiting, updating etc. You’ll need to explore yourself from here.
- Setting up svnserve. Open the terminal and type
svnserve -d(you need to open the port 3690 on the firewall ) your repositories should now be available on the network via:
svn://xxx.xxx.xxx.xxx/path/from/root/to/the/repository
- You’ll likely want to have the svnserve daemon launch automatically when a request comes in from the network. According to the subversion book you need to alter
/etc/inetd.confbut things have changed in 10.4 and you’ll find that the file is commented out and points you towards the command line app launchd which is explained here. - From this thread I followed the instructions and created a plist file with the following contents (you may need to change the path to your svnserve install).
Label
svn
Program
/usr/local/bin/svnserve
ProgramArguments
/usr/local/bin/svnserve
--inetd
SessionCreate
Sockets
Listeners
SockServiceName
svn
StandardErrorPath
/dev/null
inetdCompatibility
Wait
Then place the file in ~/Library/LaunchDaemons/org.tigris.subversion.plist there’s two ways of kicking into action. Log out and back in. Or use
launchctl load ~/Library/LaunchDaemons/org.tigris.subversion.plist
then to turn it off
launchctl unload ~/Library/LaunchDaemons/org.tigris.subversion.plist
Which is useful when debugging.

Adam Says:
October 14th, 2007 at 10:41 pm
I found the sample plist to be invalid. It gave me errors when I tried to launch it using launchctl.
I was able to get it up and going by following the apple devloper example and removing several closing tags and setting values to keys.
For instance the line under the Sockets needs to be removed so that the list with listners is set to the value of the key.