Updating SVN for Mac OS X

Main Thread 2 min read

Update: The Command Line Tools for Xcode 5 include SVN 1.7.10.

I downloaded the latest version of Eclipse and Subclipse for my new work Macbook Pro. When I ran svn commands in Terminal I received some odd messages. After some confusion, I realized Subclipse checked out the repository using SVN version 1.7. Unfortunately Mac OS X Mountain Lion runs SVN version 1.6.

I could have downgraded Subclipse. However, I had already checked out several repositories. Furthermore, I liked the smaller footprint of SVN 1.7. In typical lazy developer fashion, I went with updating SVN to version 1.7 for Mac OS X.

To give due credit, the foundations of this post came from a post on Building SVN 1.7. Although I expanded on it, I encourage you to read the original post. For completeness, I outlined the full process below.

Note: To compile and install SVN 1.7 you need Xcode with the Command Line Tools installed.

Download the SVN Source

__torchlight-block-[4f82bd17-3a7e-45de-b72b-e434cc72633b]__

Note: You may need to update the curl command to download the latest SVN 1.7 source.

Build and Install SVN

The default SVN install on Mac OS X uses neon. neon allows you to connect to remote SVN repositories via HTTP and HTTPS. Lines 2-7 installs neon. Line 8 builds SVN using the --with-neon configuration flag.

__torchlight-block-[d5ca3c9e-87a1-47cd-8a43-61bb997b1837]__

Using the New SVN

Your environment will still use SVN version installed with Mac OS X:

__torchlight-block-[47c1fd5a-3cd1-4186-894c-8160aeefff50]__

To use the SVN version you just installed, you can update your PATH. Assuming you are using the bash shell, add or edit the following line in your ~/.bash_profile:

__torchlight-block-[dbd2a6d7-65ee-4f36-a5ca-5a812ac23d2a]__

You should now see the SVN version you installed:

__torchlight-block-[c7c105d1-7928-4112-aaa6-45cc518b421c]__

Find this interesting? Let's continue the conversation on Twitter.