SVN Switch with relocate in Eclipse

32,170

Solution 1

From SVN Repository Exploring perspective right click on your project repository and choose Relocate.. from contextual menu:

enter image description here

It will bring up a confirmation windows showing you active projects which will be affected by relocation.

Solution 2

In more recent versions of Eclipse/Subversive (which don't have the Relocate option) you can simply click Location Properties instead and change the URL. It will warn you that "The attached projects will be relocated because the repository root URL differs from the previously entered one." This is what you want!

Screenshot of contextual menu

Solution 3

I had the similar issue on Eclipse Luna 4.4.2 64 bit version. Initially I've relocated the project on the command line and Eclipse failed to recognize the relocation change. Alternatively I've tried to delete and re-import the projects, but sadly this approach failed to work out as well. Then sorted it out this way;

  1. Closed all the projects,
  2. Opened the SVN Repository Exploring perspective,
  3. Right clicked on the repository >> Location properties,
  4. In the properties pane, I've changed the url and in the below I choose "Use the repository URL as the label" clicked on finish,
  5. Switched back to the Java perspective and reopened the projects.

After this alteration Eclipse stopped giving such errors and I was able to see the new root address of each project on the right side of the name

Solution 4

I found that if the projects that are related with the SVN you are trying to relocate are open in Eclipse, the operation fails with the following error in the 'SVN Console':

switch --relocate http://old.scm.com/svn/APP http://new.scm.com/svn/APP .../webapp
    svn: E155019: Cannot relocate '...\webapp' as it is not the root of a working copy
    svn: E155019: Cannot relocate '...\webapp' as it is not the root of a working copy

The solution was to close all the projects (Project Explorer -> right click on the project -> Close Project) and only after that, do the URL relocation in the SVN window (SVN Repositories window -> right click on the URL of the old SVN -> Relocate).

Notice that that the box 'Projects that will be relocated:' on the following screen is empty. Before it showed all the open projects in Eclipse IDE.

This was they only way I got it to succeed.

Using Eclipse Kepler Service Release 2, with Subclipse 1.10.10.

Relocate screen in Eclipse Kepler

Share:
32,170

Related videos on Youtube

M. Faraz
Author by

M. Faraz

Updated on March 22, 2020

Comments

  • M. Faraz
    M. Faraz about 4 years

    My question can be claimed to be an extension/similar to the question posted here.

    basically, I need to do the same functionality using Eclipse plugin Subclipse. Subclipse has a functionality to "Switch branch/tag/revision", however, this is limited as it treats the new url as a repository and tries to compare them. I only wish to change the URL.

    any ideas!

  • M. Faraz
    M. Faraz almost 13 years
    You sir...are a life saver (or atleast a few precious moments of that life)
  • Admin
    Admin over 12 years
    I don't see 'relocate' in this menu, just 'location properties' which does let me change the URL for the repository, but doesn't affect my working copy at all. Likely I need to be running a newer version of Eclipse.
  • Sathya
    Sathya over 10 years
    Thanks for this useful hint.
  • Rajeshwari
    Rajeshwari about 10 years
    I tried this but its not working.. Any idea what can be the reason?