2

I have an Eclipse workspace set up on one of my two work machines. The entire workspace is synched with a subversion repository and all projects and settings (including metadata) within the workspace are stored in the repository.

I recently installed Eclipse on my second machine and created a new working copy folder that I check out to the same repository. When I opened Eclipse and set the workspace to the local working copy folder, none of the project appeared in my package explorer.

I am still new to Eclipse and Subversion, but I would assume that as long as the workspace metadata and settings are in the working copy folder Eclipse should see them.

How do I create an exact duplicate of the original workspace on the second machine and keep the two in sync with Subversion?

Thanks in advance for your suggestions.

UPDATE: Apparently the answer provided by @Kos is the only way I have found to recreate a copy of the workspace in another working copy. Even though my .metadata folder is under version control as well, when I checkout a new working copy Eclipse does not recognize the checked out .metadata folder.

Brian
  • 2,702
  • 5
  • 37
  • 71

2 Answers2

2

Import the projects to the workspace using File -> Import -> Existing projects into workspace.

Uncheck copy projects into workspace because they are physically there already.

Kos
  • 70,399
  • 25
  • 169
  • 233
  • Will this change the metadata folder for the workspace? If so, when I sync with Subversion, will the metadata folder of the workspace on the first machine change to match? – Brian Sep 14 '11 at 14:28
  • Oh, I think I got the question wrong- so you're not just storing all the project, but the whole workspace on SVN? I haven't tried that approach but it should work too. In that case, check if you've successfully received the `workspace/.metadata/` directory. See also http://stackoverflow.com/questions/251116/where-in-an-eclipse-workspace-is-the-list-of-projects-stored – Kos Sep 14 '11 at 18:51
  • I'll try to duplicate this issue on my machine. – Kos Sep 14 '11 at 18:54
  • You're correct. I'm storing the entire workspace on SVN. I did receive the `workspace/.metadata` folder when I checked out the repository, but none of my settings or projects were automatically recognized by Eclipse. – Brian Sep 15 '11 at 13:28
0

To keep the metadata in sync, you could check out this.

"SVN Repositories" always comes up blank when you switch workspaces Is there a plugin to get Eclipse to remember them?

In short, you want to export your preferences (particularly your svn prefs) while in your old workspace, then import them into the new one.

open old workspace
Menu File > Export...
General > Preferences.
..../workspace/mypreferences.epf

open new workspace
Menu File > Import...
..../workspace/mypreferences.epf
General > Preferences.

The projects you just checked out may well not show up as being managed by SVN. You can fix this with: Rightclick on Project, Team -> Share ... then pick the right svn and the plugin will tell you that it looks like it is already shared and would you like to use the old settings. Works like a peach.

Community
  • 1
  • 1
Mason Bryant
  • 1,372
  • 14
  • 23