Thursday, April 22, 2010

Using TortoiseSVN From the Command Line

I use batch files to automate much of my build process steps. I’ll grab the latest from our source repository with one batch file, build trunk with another, and finally set up my baseline data with a third. This lets me tie these command files to SlickRun hotkeys so I can launch everything with a keystroke or two.

If you use TortoiseSVN it may not be apparent, but you can use it via the command line by invoking the TortoiseProc.exe file and passing in a couple command args. For example, to do an SVN update and get latest you’d call:

"d:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:"update" /path:”<working_copy>”

Note that you must have the quotes around the specific command you want to run, and you’ll also need quotes around the path you’re wanting to update. You can also update the current directory you’re in by using /path:. – note that’s the period denoting the current working directory.

You can read more about the available commands in TortoseSVN’s documentation.


Jon Kruger said...

You can download an SVN command line client, then you can use nicer looking commands like "svn up".

Jim Holmes said...


There are a ton of alternatives here -- I actually invoke VisualSVN's 'svn' command line tool. I just used the TortoiseSVN example here because I was actually solving a problem for my colleague.

Plus, being a conflicted minimalistic tool whore, I can get away with one less moving part by using Tortoise. :) said...

Thanks for the tip -- saved lots of time.

Anonymous said...

Is it possible to execute this command with Tortoise and have the update descriptions listed in the console instead of the window pop-up? What I would like to do is have a batch process update my local code then if that succeeds without conflicts compile an application so detecting failure and stopping the next action would be ideal. Thanks.

Subscribe (RSS)

The Leadership Journey