Restore Eclipse subversion project connection

EclipseSvn

Eclipse Problem Overview


I have a project in subversion, which I'm developing using Eclipse. I did the original checkout from the svn repository from inside Eclipse. All was well for some weeks then for some unknown reason, Eclipse (specifically: subclipse in Ganymede) no longer recognizes my project as being under svn control. The team context-menu only shows the basic "apply patch" / "share this project" menu options. From the shell, I can still update the project using the svn command line tools, so I know that the svn credentials still work. Other projects under subversion in the same copy of Eclipse still work.

I realise that I can delete the local copy and check it out again, but I'd rather understand what has gone wrong - fix the problem, rather than mask the symptoms. Where does Eclipse store its knowledge of which projects are under version control? I looked at the .project file and the .settings directory, but couldn't see any obvious mention of svn nature or anything similar, even in the projects that are still working properly.

Eclipse Solutions


Solution 1 - Eclipse

If you are using sublipse as your SVN provider I recommend doing the following

Team -> Share project is usually enough to connect the metadata.

(that is, assuming that the .svn files are still there which they seem to be if you can work on the command line).

Hope this helps as to why this would happen I have no idea

Solution 2 - Eclipse

I found an easy way just reimport the project

Solution 3 - Eclipse

Just doing Team -> Share Project (per the answer to this question provided by @Paul Whelan) did not work for me. The Share Project wizard acted as though the project was not already in SVN (even though the .svn folder was present for my project).

I ended up resolving the issue by uninstalling the Subversive and JavaHL add-ons (via Help | About Eclipse | Installation Details button | Installed Software tab | Uninstall...), and then reinstalling Subversive. When prompted after restarting Eclipse, I opted to install the SVNKit connector rather than the JavaHL connector.

After having done that, when I once again tried Team -> Share Project..., Eclipse correctly recognized that my project was already present in SVN, and it successfully restored the connection.

Solution 4 - Eclipse

Addendum: it turns out that my problem manifests when I start Eclipse outside the company vpn, with a project in the workspace that is attached to a svn repository inside the vpn. Fortunately, switching Eclipse svn plugins from subversive to subclipse did solve it.

Ian

Solution 5 - Eclipse

From eclipse, I closed the project(s) and reopened which resolved the problem. All by SVN links are back for all projects in my workspace.

Solution 6 - Eclipse

I had the same problem and this forum helped me in finding the right answer.

My earlier project was configured using subclipse. The new eclipse had subvesive.

Installing subclipse helped me get back the svn options under team!

Hope it helps someone else.

regards

Anshu Prateek

Solution 7 - Eclipse

Without knowing what platform you're on, I don't know if your problem is similar to mine. However, I have recently (actually on two different platforms!) had issues where an update to Subversive (or perhaps Eclipse itself, not clear) caused the connectors to no longer load. Without the connectors, Subversive cannot connect to a project. But Eclipse isn't going to lock you out of your project over that, it'll just remove the SVN-related functionality.

Look at the Errors view, which is a log of Eclipse's various errors (class-not-found exceptions, etc.) and see if there are any lines that related to the Subversive components. Unfortunately, I can't really recommend a solution-- on my Mac OSX platform it was enough to re-install the Subversive core elements and connectors. On my Linux machine (possibly due to an OS upgrade) I'm having to completely re-install Eclipse, as too much cruft has accumulated for me to be able to fully investigate it.

Solution 8 - Eclipse

In the Juno release with Subversive, I did:

  • File/Import brings up the Import popup.
  • From there, select General/Existing Projects in to Workspace.
  • In the next pane, you select the root directory. Then it will show you all the subdirectories. They'll all be selected by default.
  • Unselect the ones you don't want.

It will then "import" your existing directory, which can be used in-place they are already located inside your workspace directory.

Solution 9 - Eclipse

Same in my case: .svn dirs were there, but my project didn't support svn actions.

After a bit of poking it turned out that subversive plugin just disappeared after a forced quitting eclipse.

The solution was to (re)install subversive, and now everything is fine again.

Cheers v.

UPDATE: I have switched eclipse to a new version that just didn't have the plugin installed, which is the reason why I had to install it from scratch.

Solution 10 - Eclipse

This worked for me: right click-> TortoiseSVN -> Settings -> Icon Overlay properties, Selecting Shell as Status Cache. Click Ok, Refresh page.

Solution 11 - Eclipse

I can reliably reproduce this problem—it happens when checking out certain Maven projects by running "Check out as Maven Project…" not on the folder containing the POM itself but on a parent directory (such as "trunk"). In this case Subclipse checks out the project without any complaints, putting it in a workspace directory with a placeholder name such as maven.1424425443350. Inside this directory it creates a subdirectory with the name of the Maven artifact. This confuses both Subclipse and Subversion: Subclipse, as we've seen, immediately forgets that the project is under version control, and if you invoke svn status from the command line in the maven.1424425443350 directory, it will tell you that the directory is under version control but that all the version-controlled files are missing.

None of the workarounds presented in the other answers will work if this is what caused Subsclipse to forget its SVN connection. Instead, the only solution is to delete the project and check it out again, this time making sure that the checkout is performed on a directory containing a POM rather than some higher-level directory.

A better overall solution would be for Subclipse to refuse to run "Check out as Maven Project…" on directories which don't contain a POM, or else to better handle cases where it tries to do so anyway by searching subdirectories for Maven projects.

Solution 12 - Eclipse

I was using two SVNKit implementations (1.7.x and 1.8.x) simultaneously with the SVN repository version (1.8.x).

As a result the Team -> Share projects... always requested a commit message. Obviously, SVNKit 1.7.x was used which is not compatible with SVN 1.8.x.

After removing SVNKit 1.7.x eclipse used the only available correct SVNKit version 1.8.x and everything worked as expected.

Solution 13 - Eclipse

My .svn metadatas folder were deleted.

None of the solutions here worked for me (close/reopen project, delete/reimport, still unlinked)

Following steps worked for me:

  • BEFORE ALL backup source project PROJECT/ folder to BAK/
  • Eclipse > on Project:
    • Delete project, choose yes for "Delete content too?"
    • Team > checkout as fresh project, recursive
    • restores all up-to-date content and the .svn folders
  • Close Eclipse
  • Copy / override from BAK/ to PROJECT/:
    • optional, .classpath and .project files ⇾ restores Project (Java) natures, setup, build path, ... if yours was modified compared to server version (I needed to)
    • optional, all source files and folders ⇾ restores your latest local changes (I needed to)
  • Open Eclipse
  • Eclipse > File > Import project

The project is now restored, it builds and is linked to subversion again, with the latest local recent changes kept if any.

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
QuestionIan DickinsonView Question on Stackoverflow
Solution 1 - EclipsePaul WhelanView Answer on Stackoverflow
Solution 2 - EclipsejerryView Answer on Stackoverflow
Solution 3 - EclipseJon SchneiderView Answer on Stackoverflow
Solution 4 - EclipseIan DickinsonView Answer on Stackoverflow
Solution 5 - EclipseNathanView Answer on Stackoverflow
Solution 6 - Eclipseuser414944View Answer on Stackoverflow
Solution 7 - EclipserjrayView Answer on Stackoverflow
Solution 8 - EclipseChelmiteView Answer on Stackoverflow
Solution 9 - EclipsetishmaView Answer on Stackoverflow
Solution 10 - EclipseranuView Answer on Stackoverflow
Solution 11 - EclipsePsychonautView Answer on Stackoverflow
Solution 12 - EclipseThomas RawylerView Answer on Stackoverflow
Solution 13 - Eclipseel-teedeeView Answer on Stackoverflow