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:
- @echo off
- FOR %%A IN (
- "E:\home\ozh\wordpress\"
- "E:\svn\someplugin\"
- "E:\svn\someproject\"
- ) 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: http://ozh.in/jk
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..
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..
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.
Maieuh !
Thanks Ozh! Thats a cool one.
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.
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.
Ozh, SVN binaries for Windows are available at http://www.collab.net/downloads/subversion/. The syntax is cross-platform.
Robert » I know this. But as I've said, I find ToirtoiseSVN GUI unmatched.
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.
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.
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.
Hell yeah! This is awesome :D!
I dont like so many windows.. better use:
Tortoise SVN has user name and password, how do i specify that in the command line…