SVN: Relocate all subdirectories
I had to change the location of a SVN server for quite some working copies since we migrated from Subversion 1.4.6 to 1.7.1 and change the protocol from svn to http.
for dir in $(ls); do
if [ -d $dir ]; then
echo "Processing $dir";
cd $dir;
url=$(svn info| grep URL | grep "svn://" | sed 's#URL: svn://old-server/path/to/##');
if [ "x$url" == "x" ]; then
cd ..;
continue;
fi;
echo $url;
svn relocate http://new-server/new/path/to/$url;
cd ..;
fi
done
This snippet helped a lot automate the task.