What do you do if your Subversion server URL or repository
location changes and you want to update a checked out copy on your
client? The solution is the magic command
svn switch
--relocate.
- Change to the top directory of your checked out client.
- Run svn info and verify the Repository Root
is now the wrong place. The URL will be wrong too.
- Run svn switch --relocate oldRoot newRoot.
oldRoot will be whatever svn info told you it was;
newRoot is, well, the new root.
- Run svn info to verify the Repository Root is correct.
svn switch also has something to do with branches. But in this
case we're not managing a branch, just switching the Subversion
repository address. Useful for server migrations, hostname renames,
and protocol switches.