Updating multiple SVN repos on Windows

Through the course of my work here I’ve accumulated a number of SVN repos that I need to keep up to date on a regular basis. To do so manually is a bit faffy, and multi-selecting repos and updating using TortoiseSVN threw up strange errors where the repos would all try and update to the same revision number (not what I wanted.) To fix it I’ve opted to using this one line in PowerShell:

Get-ChildItem -Force */.svn | ForEach { svn update $_.Parent.FullName }

All this does is list all of the folders which have .svn folders in them (the -Force causes it to find any hidden folders) and then runs an SVN update on them. Simple, but effective. Any conflicts I then deal with in TortoiseSVN later.

It can be tweaked and changed as needed, expanded etc. but for me it’s all I needed to get it working on Windows.

 

Leave a comment