Skip to main content

How to switch your working copy when the Subversion repository URL has moved

If you followed my previous post on Supporting multiple Subversion (SVN) repositories with Apache you may have noticed that I moved the repositories from:




If you had a working copy checked out of either of these Subversion repositories then you would have received an error when attempting an update due to the repository being moved since you checked out the code.

You need to update your working copy to point to the new repository but maintain any local changes that you might have made - my colleague Guy Francis pointed out that you use the svn switch command to do this.

Here is how you update your working copy's repository URL:
  • Change directory so that you are inside the working copy
  • Run svn switch --relocate http://some-url/a http://some-url/svn/team-a .
This will go through the whole directory structure updating the source URL to point to the new location, the --relocate option forces Subversion to just update the files locally no access to the remote repository is required.

Technorati Tags: , , ,


rdf said…
Thanks, made it quick & easy