in Subclipse: How do I connect an existing workspace with an existing repository
Asked Answered
A

3

5

I'm working in Eclipse 3.72, (Indigo) using Subclipse 1.6.18 to work with a SVN 1.6 repository. This is all running under Ubuntu.

I have a project that I forgot to disconnect from Subversion before I updated my Eclipse (I had been using Galileo) and all its parts - basically a total reinstall of Eclipse, Subclipse, etc. Now when I go to "Team" all I get is "apply patch".

Since the project has unsaved changes I want to reconnect to Subversion so I can commit them. This Stack Overflow Question appears to have an answer but I didn't understand the answer. (The "winning" answer also has a link to a thread, but the link doesn't go to a thread).

So how do I reconnect my project with subversion? Thanks in advance.

Andersen answered 30/4, 2012 at 19:49 Comment(0)
W
6

The following approach should work for git, svn and any other team provider:

  • If eclipse is not aware of your existing project, use File > Import > ExistingProjectIntoWorkspace

    -- The project should now appear in your workspace

  • If the Team provider is not configured, use "Project" > Team > ShareProject > SVN/GIT

    -- The "Project" > Team menu should now contain all the items you would expect


"Project > Share Project" might not be available. To add it go to "Window > Customize Perspective > Command Groups Availability" and select "Team"

Wellknown answered 1/5, 2012 at 2:3 Comment(3)
Eclipse is aware of the local copy, i.e., the one in my workspace, but it doesn't know that this has any association with the one in SVN. From Eclipse I can browse the repository just fine - it can see all the projects there, so I just need to connect the two; I need to say to Eclipse and SVN "THIS project in Eclipse is THAT project in SVN"Andersen
It's just "Project" > ShareProject" but that worked! Thanks!Andersen
"Project > Share Project" might not be available. To add it go to "Window > Customize Perspective > Command Groups Availability" and select "Team"Meredith
C
4

What that other SO answer is suggesting it to delete the project from Eclipse, but WITHOUT selecting the "delete contents on file system" option in the confirmation dialog. That will remove the project from Eclipse's knowledge, but leave the files on your file system. Then, do File > Import > Existing Project into Workspace to get the project back under Eclipse's control. According to that answer, doing this remove-and-re-import will get svn capability back for the project - I can't vouch for the validity of that answer; I'm only interpreting it.

Carduaceous answered 30/4, 2012 at 20:57 Comment(0)
F
0

I had the same problem (the Subclipse Plugin installed in my Eclipse used a newer working copy format than the currently used working copy format in the workspace).

Doing an "svn upgrade" with a svn command line client that used the same working copy format as the installed Subclipse solved the problem: after the next start of Eclipse the projects in the workspace were connected to Subversion.

If after restarting Eclipse the projects are still not connected, in "Package Explorer" click on the "Properties" menu item in the context menu of sub folder of the project that should be under subversion control and choose the "Subversion" item in the "Properties" dialog. You should see the values of Svn-URL, Repository root and revision of that folder. After closing the dialog in the context menu of the project choose "Team -> Refresh/Cleanup" and all other subfolders of the project should show the right svn status.

Ferreby answered 3/12, 2015 at 8:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.