Associating existing Eclipse project with existing SVN repository

EclipseSvnSubclipse

Eclipse Problem Overview


I have an eclipse project on my hard disk, which is a fairly recent check out from an SVN repository. I've imported this project into my Eclipse workspace, and now want to associate it with the SVN repository.

How do I do this? The only options I seem to have under Right-click -> Team is "Share Project", which only seems to allow me to do an initial import.

Edit: Motivation - It's a largish repository, and I don't really want to have to import the whole thing over the network.

Edit 2: There are (for some reason) no .svn dirs in the project. So maybe a fresh import from svn is the only option

Eclipse Solutions


Solution 1 - Eclipse

Team->Share project is exactly what you need to do. Select SVN from the list, then click "Next". Subclipse will notice the presence of .svn directories that will ask you to confirm that the information is correct, and associate the project with subclipse.

Solution 2 - Eclipse

I just wanted to add that if you don't see Team -> Share project, it's likely you have to remove the project from the workspace before importing it back in. This is what happened to me, and I had to remove and readd it to the workspace for it to fix itself. (This happened when moving from dramatically different Eclipse versions + plugins using the same workspace.)

https://stackoverflow.com/questions/3767144/subclipse-not-showing-share-project-option-on-project-context-menu-in-eclipse

Solution 3 - Eclipse

I came across the same issue. I checked out using Tortoise client and then tried to import the projects in Eclipse using import wizard. Eclipse did not recognize the svn location. I tried share option as mentioned in the above posts and it tried to commit these projects into SVN. But my issue was a version mismatch. I selected svn 1.8 version in eclipse (I was using 1.7 in eclipse and 1.8.8 in tortoise) and then re imported the projects. It resolved with no issues.

Solution 4 - Eclipse

I am using Tortoise SVN client. You can alternativley check out the required project from SVN in some folder. You can see a .SVN folder inside the project. Copy the .SVN folder into the workspace folder. Now remove the project from eclipse and import the same again into eclipse. You can see now the project is now associated with svn

Solution 5 - Eclipse

In case of SVN servers you have to creating a central repository with all projects. The contents of the repository can be uploaded with the Team/Share command; in case of the Subversive client it automatically runs a commit after the import, so you can upload your files.

This step cannot be circumvented in any way using a centralized version management system such as SVN.

Solution 6 - Eclipse

I'm asked this question very frequently, if it's smart to use "Share project..." if a eclipse project has been disconnected from it SVN counterpart in the repository. So, I append my answer to this thread.

The SVN-Team option "Share project ..." is totally fine for projects that exist in SVN and in your Eclipse workspace, even if the Eclipse project is missing the hidden .svn configuration. You can still connect them. Eclipse SVN-implementation (Subclipse/Subversive) will verify if the provided SVN http(s) source is populated. If yes, all existing files will be copied and linked (checked out in SVN terms) to your very personal Eclipse workspace.

Word of caution:

  • Do a backup if you depend on you local files. The SVN implementation may vary its behaviour with every release.
  • If you have multiple projects encapsulated within each other, make sure you point the SVN path to the correct local path.

regards, Feder

Solution 7 - Eclipse

Try this- Close the project then open it. It links with svn automatically,if project was checked out from valid svn path.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRichard HView Question on Stackoverflow
Solution 1 - EclipseamarillionView Answer on Stackoverflow
Solution 2 - EclipseMarcusView Answer on Stackoverflow
Solution 3 - EclipseAddyView Answer on Stackoverflow
Solution 4 - EclipseKaliappanView Answer on Stackoverflow
Solution 5 - EclipseZoltán UjhelyiView Answer on Stackoverflow
Solution 6 - EclipsefederView Answer on Stackoverflow
Solution 7 - EclipseSrashtiView Answer on Stackoverflow