In: , , , ,
On: 2008 / 11 / 16 Viewed: 15461 times

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:

CODE:
  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.

Related posts

Metastuff

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. You can trackback this post from your own site

10 Blablas

  1. 1
    Robert Austria »
    commented, on 16/Nov/08 at 2:09 pm # :

    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. 2
    Ozh France »
    thought, on 16/Nov/08 at 8:09 pm # :

    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. 3
    hemostick France »
    replied, on 16/Nov/08 at 8:10 pm # :

    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. 4
    hemostick France »
    thought, on 16/Nov/08 at 8:10 pm # :

    Maieuh !

  5. 5
    Michael Germany »
    thought, on 16/Nov/08 at 11:30 pm # :

    Thanks Ozh! Thats a cool one.

  6. 6
    Randolf Germany »
    wrote, on 17/Nov/08 at 10:28 am # :

    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. 7
    Ozh France »
    said, on 17/Nov/08 at 12:19 pm # :

    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. 8
    Robert Austria »
    commented, on 17/Nov/08 at 8:21 pm # :

    Ozh, SVN binaries for Windows are available at http://www.collab.net/downloads/subversion/. The syntax is cross-platform.

  9. 9
    Ozh France »
    wrote, on 17/Nov/08 at 11:10 pm # :

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

  10. 10
    Viper007Bond United States »
    thought, on 04/Dec/08 at 4:58 pm # :

    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.

Leave a Reply

Comment Guidelines or Die

  • HTML: You can use these tags: <a href=""> <em> <i> <b> <strong> <blockquote>
  • Posting code: Post raw code (no <> &lt; etc) within appropriate tags : [php][/php], [css][/css], [html][/html], [js][/js], [sql][/sql], [xml][/xml], or generic [code][code]
  • Gravatars: Curious about the little images next to each commenter's name ? Go to Gravatar.
  • Spam: Various spam plugins on patrol. I'll put pins in a Voodoo doll if you spam me.
  • I will mark as Spam test comments, all comments with SEO names (ie "My Cool Online Shop" instead of "Joe") or containing forum-like signatures.

Read more ?

Close
E-mail It