How to setup subversion on OSX

This works with leopard.

Firstly turn on web sharing, web sharing uses apache2 under the hood although its config is bizarre to say the least.

Create a repository:
 sudo mkdir /usr/local/subversion/
 sudo svnadmin create /usr/local/subversion/Test

Ensure the repository is readable by apache
 sudo chown -R _www /usr/local/subversion/

Setup a password file (For later)

 sudo htpasswd -cm /usr/local/subversion/svn-auth-file scott
 (enter password)

Now for the first bizarre config, create a file in /etc/apache2/other called dav.conf
Which contains:

loadModule dav_svn_module libexec/apache2/

<Location /svn>
                DAV svn
                SVNParentPath /usr/local/subversion
                SVNListParentPath On
                SVNAutoversioning on

    AuthType Basic
    AuthName “Scott Subversion”
    AuthUserFile /usr/local/subversion/svn-auth-file
    Require valid-user

Restart apache:
 sudo apachectl restart

To upload the project
svn import <project> http://localhost/svn/Test

3 thoughts on “How to setup subversion on OSX

      1. Oh, just locally. If I wanted to do anything over t’network, I’d probably use something like devjavu or sourceforge1 or wherever. Let someone else deal with the boring bit 🙂 I don’t do a lot with svn at the moment, though, only the real basics.
        1 Or even nexumoja for some things.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: