Can I switch SVN repositories from Eclipse?

I am moving my Subversion repository from one machine to another. I have a few scattered working copies on various machines, and I have found that I can easily switch the working copies from the old server to the new one with the following command:

svn --relocate svn://oldServer/repo svn://newServer/repo

However, on one of my machines, I use Eclipse with Subclipse, and I don't like to use command-line SVN on my Eclipse projects. My question is whether it is possible to switch SVN repositories from within Eclipse using either Subclipse or Subversive.


I think you need to go into your 'repository browser' perspective there you right click your current repository and 'relocate' it to another domain.


Do not use the "Team/switch" option, but rather change to the "SVN repository exploring" perspective and change the URL location there in the location properties of your repository. Works like a charm on Indigo - using Subversive in my case.

When using Subversive this will show a warning "The attached projects will be relocated because the repository root URL differs from the previously entered one", which is just what you want. Be sure to open all projects you want relocated before doing this.

When getting "Cannot relocate the connected projects" with "Relocation cannot be performed because the new URL refers to the different repository" then maybe your repository root has no trunk/tags/branches folders, or has such folders in subfolders as well. Then on the tabsheet Advanced, disabling the option Enable Structure Detection might help.

If you get "Relocation cannot be performed because the new URL refers to the repository which is not valid (incorrect URL or credentials specified)" then also make sure the root path within the new repository URL matches the root of the old URL. (In other words: ensure that /new/path in the screenshot above has the same subfolders as the old URL.)


Just right click on the project-> team -> disconnect.

Then another right click on the project -> team -> share -> to your new SVN.

That's it!


Within Eclipse Navigator, if you right-click the project name a submenu will appear. On that sub-menu select Team which will provide some addtional menu options. Select the "Swich to another Branch/Tag/Revision ..." and a window will appear allowing you to specify the new branch or in your case a new repository location.