Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 822
user316117 Avatar asked Apr 30 '12 19:04

user316117


People also ask

How to connect existing project to SVN?

Select the project you want to connect with SVN and right click to select Team > Share Project... This will begin the Share Project wizard. Select SVN as the repository type and click Next. The wizard will check for valid .

How to sync existing project with SVN in eclipse?

Select project and execute Team > Share Project. Select Subversive SVN provider in Share Project wizard and at the end you will be prompted to choose the SVN location. You can keep repository settings defined in project or reconnect to another repository.

How to Share project in SVN?

You share your project when you have already been using SVN and you have an existing working copy in your workspace that you want to connect to SVN. Select any element of the model and choose File > SVN > Share... from the main menu. You will see the Share Project wizard.


2 Answers

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"

like image 129
Ivo Bosticky Avatar answered Sep 21 '22 14:09

Ivo Bosticky


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.

like image 37
E-Riz Avatar answered Sep 20 '22 14:09

E-Riz