Reputation: 13315
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.
Upvotes: 101
Views: 65462
Reputation: 16799
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).
As to why this would happen I have no idea.
Upvotes: 128
Reputation: 1341
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:
PROJECT/
folder to BAK/
.svn
foldersBAK/
to PROJECT/
:
.classpath
and .project
files ⇾ restores Project (Java) natures, setup, build path, ... if yours was modified compared to server version (I needed to)The project is now restored, it builds and is linked to subversion again, with the latest local recent changes kept if any.
Upvotes: 0
Reputation: 1095
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.
Upvotes: 0
Reputation: 897
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.
Upvotes: 0
Reputation: 1
This worked for me: right click-> TortoiseSVN -> Settings -> Icon Overlay properties, Selecting Shell as Status Cache. Click Ok, Refresh page.
Upvotes: 0
Reputation: 390
In the Juno release with Subversive, I did:
It will then "import" your existing directory, which can be used in-place they are already located inside your workspace directory.
Upvotes: 1
Reputation: 39
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.
Upvotes: 3
Reputation: 26993
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.
Upvotes: 7
Reputation: 21
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
Upvotes: 2
Reputation: 1885
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.
Upvotes: 0
Reputation: 13315
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
Upvotes: 4
Reputation: 6743
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.
Upvotes: 1