Using Subversion 2


Using Subversion


After looking into how to configure websites and the like. I came across a cool way of downloading and keeping files upto date on your computer. It is called subversion. People from Unix, and Linux background know what I am talking about. Subversion is a method in which to download files, from Terminal, into a folder. It is mostly used for remote access but you can use it on your own computer as well. This example will use WordPress, although it can be used on any site that has a repository, mostly open source sites.

This first step is to open up Terminal and change your directory to a temporary directory which you can play with. You can use the following command.

cd /Users//Desktop

The folder can be any one you want. After this you need to make a new temp folder (unless you have navigated to one already). This is done with the make directory command. The dot in front of the slash is very useful if you want to save time in writing long path names.

mkdir ./temp

This temp file has been made, you can every view it in Finder. This step is very important. Make sure you change your directory into the temp folder. Other wise the subversion command will copy everything into the folder you are in.

cd ./temp

We are now ready to roll. This command will copy the latest version across to your computer. Simply type:

svn co .

The svn command will copy every single file within the trunk folder to the folder specified. This means that you have the latest copy which you can use and abuse. You can now play with this version, test it, find bugs and report back to the developers. This helps them a lot with finding bugs etc.

Every so often this trunk file will be updated with new files. You will obviously want these files so you can use the next command. This will check your files against the ones on your computer and download any ones that have changed or been added. You do need to change you directory to the one you want to update.

svn up

Most open source sites have svn repositories. It is just a matter of looking for them and finding the right web address.

If you want to keep up with the latests post from Mac Tricks And Tips I recommend you subscribe to the RSS Feed.

Where To Next?

  • Subscribe To Mac Tricks And Tips