In: , , , ,
On: 2008 / 11 / 16 Viewed: 75016 times
Shorter URL for this post:

Working with SVN on Windows is pretty much synonym to using TortoiseSVN I guess. If you are running a trunk version of WordPress, maintaining plugins or doing anything else collaboratively, chances are you're using this nice piece of software.

When you log to you computer to get some coding work done, what is your first task? If "I manually update several SVN repositories", the following is for you. TortoiseSVN has command line support that, even on Windows, can make things easier.

Create a batch file, name it like updateSVN.bat, and paste:

  1. @echo off
  2. FOR %%A IN (
  3.     "E:\home\ozh\wordpress\"
  4.     "E:\svn\someplugin\"
  5.     "E:\svn\someproject\"
  6. ) DO START TortoiseProc.exe /command:update /path:%%A /closeonend:0

A few comments:

  • The "FOR %%A" loop will contain, obviously, paths to the projects you want to update.
  • The "START" bit means "start asynchronously, ie don't wait for end of previous task to launch next one" so that all the Update windows will pop up simultaneously.
  • the "/closeonend:0" means, you guessed, "don't close the Update window once it's done", so you can actually see what has been updated.

There you go. You can even put this .bat file in your startup folder to get things updated when you turn your computer on.

Shorter URL

Want to share or tweet this post? Please use this short URL:


This entry "Automating TortoiseSVN on Windows to Update Multiple Repositories" was posted on 16/11/2008 at 12:57 pm and is tagged with , , , ,
Watch this discussion : Comments RSS 2.0.

15 Blablas

  1. Robert says:

    The must be a reason why you won't use "svn up E:\home\ozh\wordpress\ E:\svn\someplugin\ E:\svn\someproject\".

    But can't imagine which..

  2. Ozh says:

    Robert » Because I'm using TortoiseSVN, on Windows? i.e. I don't have a svn.exe, syntax is not the same as on Unix svn command line, etc..

  3. hemostick says:

    Because TortoiseSVN has its own set of binaries, it isn't just a frontend that requires you to install vanilla svn first. So, no svn from the commandline.

  4. hemostick says:

    Maieuh !

  5. Michael says:

    Thanks Ozh! Thats a cool one.

  6. Randolf says:

    If I want to work with command line, I'll take command line SVN and don't bother with half-baked SVN clients like Tortoise.

  7. Ozh says:

    Randolf » One man's opinion. I find Tortoise far from being "half-baked" and much faster to use in a visual environment than a pure command line binary.

  8. Robert says:

    Ozh, SVN binaries for Windows are available at The syntax is cross-platform.

  9. Ozh says:

    Robert » I know this. But as I've said, I find ToirtoiseSVN GUI unmatched.

  10. Viper007Bond says:

    A better solution IMO is to set up a scheduled task. Since I never turn off my computer, your BAT would never run for me. ;)

    I have a scheduled task that starts TortoiseSVN up every 15 minutes and updates multiple SVN checkouts.

    Full details (guide + pictures) on my blog.

  11. RK says:

    I have been looking all over for a way to start multiple TSVN updates in parallel. Using "START" while calling the command did it for me.
    Thanks a lot.

  12. Drive-by Commenter says:

    Thanks for the script. Worked for me, though if you need to provide an absolute path that includes a space, change line 6 to something like the following:

    ") DO START "Batch Update SVN" "C:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:update /path:%%A /closeonend:0″

    "Batch Update SVN" was added because if START is followed by an argument in quotes, it uses that as the window name. You can make it anything. Then, you can use quotes in the next argument for your absolute path.

  13. ben says:

    Hell yeah! This is awesome :D!

  14. Trullo says:

    I dont like so many windows.. better use:

    1. @echo off
    2. set projects=""
    3. FOR %%project IN (
    4. "C:\Program Files (x86)\Zend\Apache2\htdocs\Project0"
    5. "C:\Program Files (x86)\Zend\Apache2\htdocs\Project1"
    6. "C:\Program Files (x86)\Zend\Apache2\htdocs\Project2"
    7. "C:\Program Files (x86)\Zend\Apache2\htdocs\Project3"
    8. "C:\Program Files (x86)\Zend\Apache2\htdocs\Project4"
    9. ) DO CALL :CONCAT %%project
    10. TortoiseProc.exe /command:update /path:"%projects:"=%" /closeonend:0;
    11. goto :eof
    13. :CONCAT
    14. set projects=%projects%%1*
    15. goto :eof
  15. jayanth says:

    Tortoise SVN has user name and password, how do i specify that in the command line…

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar and sign for a free account
Spam: Various spam plugins may be activated. I'll put pins in a Voodoo doll if you spam me.

Read more ?