Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I switch SVN repositories from Eclipse?

Tags:

eclipse

svn

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.

like image 284
Brandon Yarbrough Avatar asked Mar 24 '09 22:03

Brandon Yarbrough


People also ask

How do I move a svn project from one repo to another?

If you don't want history, you can use svn export to get a clean folder without the . svn folders and then svn import into your other repository. With history, you would need to use the svnadmin dump . You would then use svndumpfilter to filter for only the parts or paths you want to use before using svnadmin load .

Where is svn repository in Eclipse?

#1) Right-click on the project folder in the project explorer, and click on Team -> Share. #2) In the following window, select SVN and click next. #3) The next window will ask you for your SVN repository URL and credentials, enter that and click finish to add and commit.


2 Answers

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.)

like image 34
Stefan Haberl Avatar answered Sep 28 '22 02:09

Stefan Haberl


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

like image 75
Luke Avatar answered Sep 28 '22 01:09

Luke