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.
  1. Change to the top directory of your checked out client.
  2. Run svn info and verify the Repository Root is now the wrong place. The URL will be wrong too.
  3. Run svn switch --relocate oldRoot newRoot. oldRoot will be whatever svn info told you it was; newRoot is, well, the new root.
  4. 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.
  2007-09-09 17:35 Z