Eclipse – Reconnecting a project to SVN in Eclipse

eclipsesvn

I have a project that has been versioned by SVN for months, but now all of a sudden it seems that Eclipse does not recognize the project as being under version control. In the team menu, I only have Apply Patch… and Share Project…

I tried Share Project as suggested elsewhere, but Eclipse doesn't recognize the project as being under version control.

All the svn dirs exist.

Interestingly, I tried sharing the project to a different repository and I got an error saying that the project was already a working copy for another URL.

Any ideas?

Best Answer

There are a few things that you can try.

  • If the project is in synch with SVN, probably the easiest way is to delete it and check it out anew.
  • Otherwise, you can try to delete the project from your workspace (not from disk!) and to re-import it into the workspace.
  • If that does not work, you can try to use the SVN command line tools, e.g. svn commit, to synchronize your local project with the SVN repository (and check it out anew using Eclipse).
  • In case the SVN command line tools do not work, there might to be an actual problem with the SVN files. In this case, you could back up your project (with unsynched changes), check out the project from SVN, and use an offline-diff-tool such as diff or meld to carry the changes over to the newly checked-out project.