Mono SVN repositories moved

Mono finally closed their main SVN for anonymous access and added a new host for anonymous access. I have a bunch of different mono projects checked out in my /opt/mono/src directory and honestly I like to follow trunk for a number of them. I don’t want to recheckout all of them again so I came up with this little shell script/oneliner.


for i in `grep myrealbox */.svn/entries | awk -F/ '{print
$1}' | uniq` ; do pushd $i ; FROM=`svn info | grep URL | cut -d' ' -f 2 ` ; TO=`echo $FROM | sed -e 's/svn:\/\/svn.myrealbox.com/http:\/\/anonsvn.mono-project.com/'` ;svn switch --relocate $FROM $TO ; popd ; done

I hope this helps you.