Twelve Dozen

Just another WordPress weblog

Archive for the ‘svn’ Category

Installing Subversion

I’m fairly new to Sub Version, and to get it working on my Mac has been a challenge. But in true blogging style I thoughts I’d share my experience. After using Sub Version in action in a small development time it becomes increasing important if your working in a team on a web project, or even if you’re a freelance web developer working on more than one computer. Recently, I’ve used Sub Version instead of FTPing to my server so I could do some CSS testing on a PC with IE 6. It’s a lot quicker than FTP and I have the option of rolling back my updates if I make a mistake. It’s also a good excuse for me to get used to sub-version. Interesting a tech group that I’m part of did a presentation about Sub Version and GIT, the 2 most popular source control software. You can watch the video at the Super Mondays website.

Anyway, here’s how I finally got Sub Version setup on my Mac OSX. By the way my mac is using OS X 10.4 Tiger. I also installed Sub Version on OS X Leopard and it was actually easier.

Install Sub Version on a Mac

This is a pretty helpful tutorial:

Step 1: Download the subversion client and install

ISSUE: When I came to download the subversion client from

I noticed the default location for the folder was /opt/subversion/bin which is different to the deafult location on my mac which is /usr/local/bin.

Step 2: Update profile

ISSUE: I couldn’t find my .profile file. I had a .bash_profile, but updating this didn’t make any difference.

I noticed I had a file called profile in my /etc folder.

You may need to enable view hidden files in Finder or if you’re using the terminal try navigate to the etc folder using cd /etc then use ls -a.

In the profile file it mentions this is the universal profile.

Update as described in tutorial website mentioned above, basically something like:
export PATH=/usr/local/bin:$PATH

Ok, now quit terminal and then open it again. The changes to the profile file that you just made will now be active.
Test using the command svn.
This should now present Type ’svn help’ for usage.

If you don’t see this message then SVN is not installed.

Step 3: Install SVNx

I downloaded the latest version of SVNx from here:

I installed this over a previous version.
Open SVNx, in preferences make sure that ‘path to svn binary folder’ is set to where you installed Subversion.
In my case the default was /opt/subversion/bin I changed this to /usr/local/bin

You should now be able to use SVNx to connect to your repository.

Connecting to your repository

To make use of sub version you’ll need to setup a repository. You can set a repo on your local machine, but what’s the point of that, you’ll want to setup an external repo. Unless you have a server that you have SSH access to and can setup your own repo I suggest the next best thing is to use the free online repository at

Step 1: Sign up for a account

Setup your repo. I’ll not go into detail it’s fairly straight forward.

In your Unhuddle account you’ll have a URL for the repo e.g.

Step 2: Setup SVNx

Open SVNx. Connect to your repo using the unhuddle URL, username and password.

Clicking on this newly created repo should open up a dialog box. If all went well that will connect and at the bottom you’ll see a root folder. As this is a new repo the root folder should be empty as you’ve not uploaded any files to it yet.

Step 3: Checkout a copy of your repo

The next step is to checkout a copy of the repo to a local folder. Click Check Out. Select the local folder on your computer you want to use. This seems a bit strange as there are no files to checkout, but don’t worry just do it. What this will do is add .svn files in all your folder. This is where all the info about your changes are kept.

WARNING: If you’re using a live website project, be warned this will add .svn file to all of the folders in the local folder you select. The options are to create a backup of your live project folder, or if you use the terminal there’s a simple command that you can use to remove all the .svn files, How to remove SVN files.

Final step: Working Copy

Now in the Working Copies window create an entry for your local folder. When you click on this entry a Working Copy window will open. If you have files in this folder you should now be able to Add, Commit, Delete, Revert.


  • Filed under: svn
  • Outputting from SVN

    This provides a real time saver and an issue that I’ve been wrestling with recently.

    A tip for MAC/Linux users using SVN.

    One of the issues that I was running into when developing websites using SVN was that I wanted to copy an existing folder from one site to another one but when copying the folders would continue to have the hidden .svn folders. For all that use SVN you know what I mean.

    Normally what I did was just copy the folder and then go in and manually remove all of the hidden .svn folders. That was okay for a folder or two, but when I needed to copy a folder which contained several sub folders it became a complete pain. After a little bit of searching I found a solution for those on a MAC or using Linux.

    Open up a terminal and type the following.

    rsync -aC –exclude .svn TARGET FOLDER DESTINATION FOLDER

    Note: there are two hyphens before exclude. (That tripped me up for a bit).

    Hope that helps someone.

  • Filed under: svn