Subversion (OS X)

From The System Administrator Zone
Revision as of 02:45, 3 April 2008 by BobVanCleef (talk | contribs) (OS X Subversion moved to Subversion (OS X))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

The problem with installing the server component of Subversion on an OS X machine is getting it to start after the next reboot.

The normal location for the svn repository is /usr/local/svn. For the sake of clarity I am using a different folder, /Volume/raid0/Subversion. After all, who wants to fill up the system disk on your server with data?

Manually Starting the Subversion Server

To manually start the subversion daemon:

sudo /usr/local/bin/svnserve --daemon --root /Volume/raid0/Subversion

Configure the Subversion Server to Automatically Start

Download the launchctl configuration file: org.tigris.subversion.svnserve.plist

Edit the file to point to the actual location of your server's repository.

        <array>
                <string>/usr/local/bin/svnserve</string>
                <string>--daemon</string>
                <string>--root</string>
                <string>/Volumes/raid0/Subversion</string>
        </array>

Copy the plist file to /Library/LaunchDaemons/org.tigris.Subversion.plist.

sudo launchctl load /Library/LaunchDaemons/org.tigris.subversion.svnserve.plist
sudo launchctl start org.tigris.subversion.svnserve

You can test the availability of the connection using telnet

(Enter will cause the connection to close.)

bash$ telnet snvhost 3690
Trying 10.20.30.21...
Connected to snvhost.
Escape character is '^]'.
( success ( 1 2 ( ANONYMOUS ) ( edit-pipeline svndiff1 absent-entries ) ) ) 
Connection closed by foreign host.
bash$