Under The Microscope

Of Subversion And MacOS X

We’ve spent the last week or so moving all our projects into a Subversion repository. This was a rather big development move for us, so I spent a fair amount of time researching Subversion, and more specifically, Subversion on MacOS X. The basics of Subversion have been pretty well covered by everyone else, but OS X specific Subversion material is a bit lacking. So I took some notes during the entire setup process, and present them here.

Subversion Basics:
Adam Swift wrote a good set of instructions for installing Subversion, both client and server on OS X. It covers all the standard ways of installing Subversion on OS X.

For actually using Subversion, one has to look no further then Version Control with Subversion, available in both download and dead-tree formats. It really covers everything quite throughly, and is worth reading cover-to-cover if you have the time. There’s a section for CVS users in the back, if you are switching.

Subversion and MacOS X 10.2:
It seems that all the pre-built copies of Subversion, are 10.3-only builds. For various reasons, we still do our development work on 10.2 (thats a story for another post). It also seems that nobody else has documented how to build Subversion for 10.2. So after a bit of experimenting I came up with this script that will successfully build Subversion 1.0.6 on 10.2. We had trouble with building 1.1.0rc1, so we are sticking with 1.0.6 until 1.1.0 is officially done (“real soon now” they say).

Subversion and older Interface Builder:

Old versions of Interface Builder (pre Xcode 1.2) don’t play well with Subversion. They will either delete Subversion’s “.svn” directories, issue “read-only nib file” errors, or do both.

There are old workarounds for some of these problems, but nothing that was complete for our working environment.

So, inspired by SubversionPalette (which was inspried by OmniCVSPalette), I wrote SVNPalette. Just download it and drop it into /Develop/Palettes or ~/Library/Palettes, and all older copies of Interface Builder will then behave toward Subversion as they should (that is, completely transparently).

Subversion and OS X specific configuration
Although it isn’t well documented, there are some client side Subversion configuration settings that can make svn nicer. They are stored in: ~/.subversion/config. Here is the interesting part of my configuration file:

global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store *.pbxuser build
enable-auto-props = yes

*.pbxuser = svn:mime-type=application/octet-stream

The “global-ignores” line is the default global-ignores, with the addition of “*.pbxuser” and “build”. This keeps pbxuser files and build folders out of the results of “svn status”, where they are just clutter.

The three auto-props lines make sure that pbxuser files are always marked as binary, they default to being treated as text otherwise. This is a way of fully automating Bill Bumgarner’s original solution for pbxuser files.

Fancy OS X-only Subversion tools:
If you are using OS X 10.3 (which I suspect just about all of you are), there are a few handy Subversion tools avaliable: svnX and SCPlugin.

svnX is a very impressive Subversion graphical frontend. It won’t save you from having to learn the Subversion command-line interface, but for a lot of everyday browsing tasks, it is quite nice.

SCPlugin is a Finder plugin that lets you issue Subversion commands on your working copy directly in the Finder. It also adds nifty status badges to the file and folder icons in your working copy.

Comments for this post have been closed. Thanks for reading!

Our Software