Setting Up Subversion on OS X

I was dismayed, I must admit, to find a dearth of binaries when I was ready to install Subversion, the open source version control system, on Bender2, my MacBook Pro. But the journey brought me to an even better conclusion.

Apple has an article about installing Subversion on OS X, but it’s old (2005), and refers to version 10.4 Tiger; whereas I’m on 10.5 Leopard.

Meanwhile, the Subversion Downloads page references three projects offering OS X binaries. I settled on the MacPorts project because it offers a completely up-to-date version of the package. In fact, MacPorts is all about easily loading, building and installing fresh versions of over 5000 open source packages.

OK, confession time. I’ve never compiled a Linux kernel. I’m not keen to start, either. So the MacPorts solution was attractive to me. Here’s what I had to do to get there.

First, you need to install Xcode Developer Tools available from Apple’s Developer Connection. You’ll need to register, but it’s free. Once inside, go to Downloads, select Developer Tools on the right, and scroll down to Xcode 3.1.2 Developer Tools. (I’d give you a link, but I don’t think it would get you there, since its behind the login.)

Xcode is necessary because it has the GNU C++ compiler built in. This is what’s used to compile all these wonderful open source packages. Pluswhich, Xcode’s pretty cool in its own right, and I’m keen to get started playing with it.

The other prerequisite to MacPorts is the X11 windowing environment. Happily, it’s already part of Leopard.

Then you simply install the MacPorts dmg package for Leopard. They also have versions for Tiger and Panther.

Still with me? We’re almost there.

In a terminal window you issue the following command:

      port search subversion

It will list all packages related to subversion in its library of nearly 6000 titles. You just want subversion. So you issue this command:

     sudo port install subversion

It’ll take a while, because MacPorts will also download, compile and install all dependencies, and there are quite a few. But it’ll get you there.

The MacPorts project also sports some very elegant documentation, which explains all the in’s and out’s of the package.

All in all, I’m very impressed with MacPorts, and extremely grateful to all the people who’ve worked so hard on it. Keep up the good work guys!

2 thoughts on “Setting Up Subversion on OS X

    • My job is developing software. It’s also my passion. My tools either help me in getting where I’m going, or they get in my way. They usually get in my way when I haven’t spent enough time learning how to use them. I’m just getting comfortable with Subversion. I don’t want to take time out to learn a new versioning system: I have work to do.

      I’ve heard a review of Git on some podcast. It wasn’t compelling enough to merit more of my time.

      Though I expect it’s inevitable that I’ll come across a project which will be Git-based, and I’ll have to jump in. Until then, I’m a proud Subversive! 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.