Setting up SVN on Macintosh

SVN is a very important tool, required by all programmers. Normally on a Macintosh there are two types of clients, the terminal client and the UI clients. I prefer having both the terminal and UI clients on my machines.

I use terminal client for updating my code from my build scripts. I have set up crontab to start building post mid-night. If you want to find out more about crontab. UI client is used for checking file changes before committing. Am not going to describe all the clients here. Am gonna write about installing two of my favourite clients.

If you want to try different svn clients, you can try this page.

The terminal client.
Terminal client for mac can be downloaded from collabnet site. You would have to register with COLLABNET to download the file. There are no registration fees.
I downloaded Subversion-1.6.9-10.6.x.dmg. Double click the dmg to launch it. Go through the installation process.

Once the installation is complete. Go to “/Applications/Utilities/”(shortcut key “command + shift + U” )and launch the terminal application and enter vi .bash_profile. (You can try any other editor like pico and vim for opening the file).

Append the following lines into .bash_profile file,
export PATH

Restart the terminal. Your terminal client is ready to run. Try svn help to explore different options supported by svn.

UI client
I normally prefer SmartSVN. It is heavier than the other clients available, but some of the options that it provides is really impressive. To top it all it works on all the major OS, that means once you know to use it on one OS you wouldn’t have trouble dealing with in on other OS.
Installing this is very simple. Download the file from here and unzip it.
Double click on smartsvn package to launch it. It comes in two version free and paid. Free users can try out paid version for a month. Based on your wish you can try either of the free or the licensed version. I normally use free version.

Select first option if you want to use the free version.

The tool that this client provides for comparing base version and local version of code is unmatched in other svn clients including tortoise svn on windows. It allows the user to edit and write comments for code changes on the local version of the code.

The other UI based client that I have used and felt comfortable was svnX. It’s light weight application but is a little confusing for a new-bee to get used to.

Resolving the host name
Normally the server in which the svn repository is based would have a domain name, and if the server is a local server. SVN clients have trouble resolving the domain name.

The easiest way to resolve this problem would be to

1. Press “command + shift + G” in finder window and enter this in the dialog “/etc/”.

Enter /etc/ in the dialog

2. Copy “host” file from “/etc/” and paste it to the desktop(or any other location)
3. Open it, type the ip address to the left and write the name after that.

Replace **.***.***.** with the correct IP address

4. Open the repository link now. It should open the repository.

Before ending this, I would like to thank Mr. Mithun Kamath for teaching me these things.


2 thoughts on “Setting up SVN on Macintosh

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s