darrylbraaten.com

Software Development and System Architecture

 

Welcome to darrylbraaten.com Sign in | Join | Help
in Search

Darryl's Homepage

Random Ramblings

Subversion use it, love it.

A few years ago I worked on a project that used Subversion for as their source control application.  While it worked ok, the graphical interface to it, Tortoise SVN wasn't up the task and I ended up not liking subversion very much.  

On a recent project we switched from Visual Source Safe to Subversion and Tortoise SVN as our interface.  The switch to Subversion went very well, it took less then a day to get everybody up to speed.

The things I like about subversion over VSS.
Deletes are tracked, updating your working copy removes files that someone else deleted.
Commits (check in, in vss) are atomic across multiple files.
Branching is very easy
Every commit marks the entire repository with a version number.
There is not need to check files out.  
Merging in changes is very easy, automatic in most cases.

The first point is the most important for long time VSS users,  nothing is worse then deleted files hanging around in your working folder.  Doing an update is much nicer then deleting your working folder and getting everything out of VSS.  

Commits being atomic is nice because it you can see all the files that a person changed when they did a commit. Also as a developer it gives you a list of all the files that are about to be committed before you do it so you have a better idea of what you are doing.

Every commit marks the repository with a new version number.  At first look this seems like it is an undesirable thing, and reading the SVN documentation gives you the impressions that lots of people don't like it.  I like it because it gives each version of what you are storing in the repository a label, and that label lists all the files that changed.  Creating a build from any version become very easy, you just get the files from the repository at the version you want.  

Not having to check files out is nice, and becomes nicer the larger the team you are working with.  When I was managing a large team of developers it was very common to be chasing down people who had files checked out when they didn't need to, or less common fixing things if someone was away and had files checked out.  

A side effect of allowing multiple people to work on the same file, is that merges become necessary luckily Subversion makes merging simple,  Tortoise SVN makes it very simple.  Tortoise gives you a window that shows the original file, your file, and the resulting file, you just pick which changes you want to keep in the resulting file.  Though most of the time you will only need to do merges when moving changes from a branch or if you haven't done an update from the repository in a long time.

While Tortoise isn't necessary to use Subversion it make Subversion much easier to use. It provides a graphical interface for merging, diffs, commits and updates.  It also puts nice little icons on your folders in explorer so that you can see folders where you have changed files really easily.  

A handy string for excluding all normal Visual Studio working and personal files is:
*.scc */bin *.dll *.exe *.pdb *.log.* */obj *.user *.suo
This prevents individuals configurations and other cruft from getting into the repository.

Subversion can be found at subersion.tigris.org and Tortoise SVN can be found at tortoisesvn.net 

Published Saturday, April 14, 2007 6:18 PM by darryl
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Dunk said:

Agreed - been using SVN for about 2 years now, and Tortoise for almost a year. I remember the joys we had with VSS back in the day... :-)

You can also hook into various events (such as pre-commit, post-commit etc.) via the "hooks" scripts - I use this to send myself (the SVN admin) an email detailing all commits which is handy..

Oh yes, and  SVN is cross-platform - should you perhaps be using a more advanced OS than windows... ;-)

April 18, 2007 4:10 PM

Leave a Comment

(required) 
(optional)
(required) 
Submit