These instructions will guide you through the process of installing and using the Subversion Client on OS X. Later I’ll do a post on how to setup your own SVN repositories, but for now it’s just how to setup the client to access repositories. The initial setup takes some time, (approx. 20-30 minutes), and you will need to use the Terminal, so pay attention, and we’ll get through this together.

Files Needed

To begin, download the following files:

  • Subversion Client - This is the client software used to connect to the server. It’s command-line only. The current version as of this writing is 1.2 - You can download an installer from http://metissian.com/projects/macosx/subversion/
  • SCPlugin - Enables integration with the OS X Finder, adding Subversion commands to the Finder context menu.
  • svnX - A GUI application that allows browsing of SVN repositories, importing of new projects, checkouts of repositories, etc. The current version available as of this writing is 0.9.5.

Installation

Installation has three main steps. The first “The Subversion Client” is required, but the last two are optional. However, they make using SVN much easier.

The Subversion Client

  1. Begin by installing the SVN client first. Mount subversion-client-1.2.0.dmg (or whatever version you downloaded), and run the installer package inside. Follow the instructions, and when the install is complete, open Terminal (located in Utilities > Terminal).
  2. We’ll be using Terminal to verify that Subversion was installed correctly. We’re also going to make SVN easier to access from the command line, to save you some typing in the future is you decide to use SVN that way. To do so, you’ll need to edit your .bash_profile file. This tells the bash shell where to look for Subversion. In this guide, we’ll be using Pico to edit the file. At the command prompt, enter pico .bash_profile

  3. Add the following lines to the file: PATH="/usr/local/bin:/usr/local/subversion/bin:$PATH"
    export PATH
  4. Save the file (control-O in Pico)
  5. Restart Terminal.
  6. You should now be able to enter svn at the command prompt, and receive the following output: “Type 'svn help' for usage.” This means that SVN is now installed and ready for you to use via the command-line.

Subversion is fully-functional and can be used only from the command line if you like. I recommend that you spend some time becoming familiar with the command line interface. Some commands can only be issued using the command-line, and you will be able to get a better understanding of how SVN functions. Also, the Subversion tools for Mac are nice, but since the ones used here are still under development, some features are still missing.

Installing SCPlugin

  1. Follow the installation instructions here: http://scplugin.tigris.org/installation.html

Installing svnX

  1. Mount svnx.dmg, and drag svnX.app to your Applications folder, or wherever you would like it.
  2. Open svnX, and open the Preferences panel. Enter the path to your Subversion binaries folder (/usr/local/bin) in the text field, and close the Preferences panel.
  3. svnX opens with two windows, “Repositories” and “Working Copies”. You’ll need to add a new link to the repository you want to access. Create it by clicking the “+” button in the Repositories window. Give the new link a name, enter the url of the repository, and the username & password given to you for the respository by the system administrator.

    Double-click the new link in the list to access the repository. svnX stores your password in clear text, so after you login, erase your password if you do not want it visible. Subversion stores your login information in a cache file elsewhere on your system, so you will not have to enter it each time. You can specify that Subversion does not cache your login information, however this option is only available via the command-line.

You should now be ready to begin using Subversion on your Mac. For additional information on using Subversion and it’s various commands, please consult the documentation available in the Subversion Book

References:

Update: - SC Plugin has at times some issues refreshing the icons in a working copy to correctly show their status. Check out the next entry titled Nudge Your Files In OS X for info on Nudge, a free utility that can help correct this.

As with all my tutorials and other assorted ramblings, I’d love to hear your comments, questions, whatever. Also, if you find a typo or error, let me know so I can fix it.


The following link has nothing to do with SVN, other than it’s the version control software we use at Footnote.com. This is a link to a topic page there that I’ve created about the construction of Disneyland. The link is for a little experiment we have going on how well these links work, and if search engines will pick them up.