If only I were

Building Great Software

Posts Tagged ‘tortoisesvn

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