Tel: 07737089487
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.
This is a pretty helpful tutorial:
http://blog.joshbuhler.com/?year=2005&monthnum=07&day=05&name=setting-up-the-subversion-client-on-mac-os-x&page=
ISSUE: When I came to download the subversion client from http://www.open.collab.net/downloads/apple/?_=d
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.
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.
I downloaded the latest version of SVNx from here:
http://www.lachoseinteractive.net/en/community/subversion/svnx/download/
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.
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 unhuddle.com.
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. http://yourdomin.unhuddle.com/your_repo.
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.
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.
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.
Leave a comment...