23

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!

4 Answers 4

44

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.

3
  • 2
    You sir...are a life saver (or atleast a few precious moments of that life)
    – M. Faraz
    Aug 9, 2011 at 8:10
  • 1
    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.
    – user931743
    Sep 6, 2011 at 23:56
  • I tried this but its not working.. Any idea what can be the reason?
    – Rajeshwari
    Mar 21, 2014 at 7:53
29

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

0
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

2

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

1
  • When I did this it did not actually migrate the Eclipse projects to the new URL; just the repository location.
    – rghome
    May 11 at 9:36

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.