If only I were

Building Great Software

Posts Tagged ‘Source Control

World’s simplest source code updater

with 6 comments

Update: So, I’ll fess up and admit this wasn’t the simplest. Tim Barcz did this 1 (or 2 or 3) better and simplified the script with:

@ECHO OFF
FOR /D %%a IN (“*”) DO IF EXIST %%~dpa%%a\.svn svn update %%~dpa%%a
PAUSE

I feel like I was trying to start a fire by hitting two rocks together and Tim walked in and pulled out a box of matches.

Many of the projects I watch are hosted on Subversion repositories. I’m tired of right clicking in each directory with TortoiseSVN and clicking “SVN Update.”

So I went the simplest route possible to automate updating source. I have this set of commands in a file called update.cmd. In the morning I double click it and I can see any updates from the previous day.

Of course, you need to adjust the directories and project names for the projects you watch.

rem this script expects svn to be in the path

cd witty
svn up

cd ..\ironruby
svn up

cd ..\subsonicproject
svn up

cd ..\masstransit
svn up

cd ..\spark
svn up

cd ..\crineta
svn up

cd ..\programmingmvc
svn up

cd ..\codecampserver
svn up

cd ..\coregallery
svn up

cd ..\csla
svn up

pause

Written by Chris Sutton

October 1, 2008 at 7:53 am

Team System 2008 VPC

leave a comment »

If you would like to experiment with the new Team System bits you can just download the vpc here. The bonus here is that there are 38 hands-on labs right in the vpc.

Written by Chris Sutton

March 31, 2008 at 10:49 pm

Posted in Technology

Tagged with , ,

Source Control Thoughts

leave a comment »

I was catching up on some ALT.Net reading on the Yahoo Group and came across this gem on a thread talking about people’s favorite version control:

I was informed recently that I may have to contribute to a project that’s using VSS… I immediately thought of this quote about VSS by a MS employee “Visual Source Safe? You’re better off printing out your code, putting it through a shredder, and lighting it on fire.”

Just to be fair, if you have your source stored in Visual Source Safe, that is better than nothing. But you can do much better with little effort.

VSS still doesn’t have atomic commits to the best of my knowledge.  What other kind of database that stores information as critical as your source is allowed to get away with non-atomic commits?

If you have had your source stored in VSS for at least a year and you are the admin, how many times have you had to run the database analyzer? And how many times has it told you that your repository or a block of files have been corrupted?  If your repository has been corrupted at least once, you should have red flags all over the place.

Think of this in terms of your regular databases.  If your SQL Server/Oracle/MySQL databases frequently gave you “your database has been corrupted” messages would you keep using that database?

So once again, you can do better. Here are two good options – there are many more.

I think the easiest sell is using a tool like Subversion.  It is a stable and widely used repository.  There are excellent client and admin tools available for many platforms.  I have used Subversion off and on for the last 4 years and heavily for the last 2 years and have been very pleased with it.  It is stable, reliable, accessible and it is actively being improved and developed.

If you are a larger company in the Microsoft space and you have plenty of money budgeted for your source control strategy you might look at Team Foundation Server. I’m using this on an open source project and have been satisfied with its performance and usability. My only gripe so far is that it does poorly in a disconnected scenario – Subversion really shines here.

Written by Chris Sutton

March 25, 2008 at 8:42 am