Restore Eclipse subversion project connection

Viewed 64862

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.

13 Answers

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

I found an easy way just reimport the project

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

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.

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.

Related