Subversion on Mac OS X with DarwinPorts

1 minute read Published:

I wish I’d had the benefit of this article a few months back when I was setting up my Subversion server. Although the svn documentation is excellent, it’s good to see a Mac OS X specific tutorial.

Installing Subversion (plus dependencies) using DarwinPorts is really simple: just cd to your darwinports/dports/ directory and type sudo port install subversion +mod_dav_svn. Instructions on how to install DarwinPorts are here.

I put together a Subversion startup item (installed into /Library/StartUpItems/), although really this is just an Apache2 startup item, but I called it Subversion since that’s all I’m using Apache2 for. The script assumes you’ve installed Apache2 in /opt/local/apache2, and requires SVNSERVER=-YES- to be added to /etc/hostconfig.

Update: Apple has now has a useful article Getting Control with Subversion and Xcode detailing how to compile Subversion from source for use with the version of Apache2 shipped with Mac OS X Server, as well as how to install WebSVN, which offers as web-based “view onto your subversion repositories that’s been designed to reflect the Subversion methodology”. Although I’m not sure why an article about Subversion suggests downloading WebSVN rather than checking it out from the svn repository:

svn co websvn