SVN Switch with relocate in Eclipse
Asked Answered
O

4

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!

Obduliaobdurate answered 8/8, 2011 at 9:8 Comment(0)
L
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.

Labourer answered 8/8, 2011 at 13:47 Comment(3)
You sir...are a life saver (or atleast a few precious moments of that life)Obduliaobdurate
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.Pigment
I tried this but its not working.. Any idea what can be the reason?Appetizing
C
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

Cule answered 13/12, 2013 at 22:33 Comment(0)
S
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

Stefan answered 21/3, 2017 at 13:38 Comment(0)
G
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

Greater answered 21/9, 2015 at 15:17 Comment(1)
When I did this it did not actually migrate the Eclipse projects to the new URL; just the repository location.Barbed

© 2022 - 2024 — McMap. All rights reserved.