SVN and Versioning

First came CVS, then came SVN, now it seems like GIT is becoming the standard versioning system.  Who knows…

Anyway, Have you ever sent a client the wrong version of a file, or been making changes to an older version of a file just to realize that you aren’t working on the latest and greatest?  Have you ever wished you could simply go back to where you knew it was working, and start over?  A versioning system is your answer.

I like SVN and have found a great site: that provides some SVN hosting plans.   I’ve been using unfuddle for some time and I love their service.  Sure, you could run a full SVN server on your computer, I haven’t really looked into what that entails, perhaps also installing Apache or MySQL — but I want to program, not spend hours setting up a server and tweaking the setting, and god-forbid if I expose it to the real-world I have to update it regularly and stay on top of the patches — too much work.

Another advantage of a third party hosted solution is the ability to access it from multiple computers (for example, office and home) and stay up to date.  No more need to zip and email, or use some home-brew versioning system consisting of  v1, v1.2, revB, March 09 Build, etc.  Just right click on the file / folder, and click commit.

Even if setting up a local server were much easier than I think it is, unfuddle provides a free plan!  The free plan is probably fine for most independent users, as of writing it provides 2 people access to 1 project of up to 200MB.

Periodically, within an hour or so of each commit, you get an email outlining the updated files and the updater’s comments — this has been very useful for multiple contributer projects.

You just sign up, create your project, it gives you the SVN information and you enter that into your favorite SVN client. I use mostly windows when I program, and I use Tortoise SVN.  (I don’t have a ton of experience with different SVN clients, Tortoise gets the job done.)

Installing Tortoise SVN is a breeze.

After you are all set-up, navigate to where you want to commit, probably the higest directory that contains source material that you want versioned, right click and click SVN Checkout (I know, there is nothing to checkout yet, bear with me).

Initially it will ask you for your SVN information, and then once it accesses the database, a username and password.  After that, it will check out nothing.  Fine.  Now you will be able to select your files that you want versioned.  To do this, either select-all and remove them later or ctrl+click now and selectively add files and folders (if you select a folder, the entire contents — recursive — will be queued to be added).  After you’ve highlighted what you want to commit, right click and click Tortoise SVN -> Add.

In the list you can uncheck any files you don’t want versioned (helpful for datasheets, helper .exe apps, etc.).  Then click OK.

You’ve just told your computer that you want these files to be included in the next commit, you haven’t actually uploaded any data yet.  To upload (commit), right click anywhere in the folder, and click “SVN Commit…”.  The files will begin uploading.  You can now, from another computer, or others can who have access, from their own computer, update their local files and commit their changes.

You also now have all the features that come along with SVN, including running diffs, reverting to previous commits, seeing the update log of each file, branching, etc.

unfuddle adds one more thing I like, the ability to view (syntax highlighted) files, and run diffs online!

Together they’re a great pair.

Posted Monday, March 9th, 2009 under firmware, reviews, tips and tricks.

Leave a Reply