views:

932

answers:

4

I'm using Eclipse with Subclipse to do some perl development. The Subversion repository is setup like:

  • /repos /repos/dev/
  • /repos/dev/crontabs
  • /repos/dev/crontabs/script1
  • /repos/dev/crontabs/script2
  • /repos/dev/daemons
  • /repos/dev/daemons/script3
  • /repos/dev/daemons/script4
  • /repos/dev/tools
  • /repos/dev/tools/script5
  • /repos/dev/tools/script6

On the file system, I have the entire /repos/dev tree checked on locally to ~/dev and have created three Eclipse workspaces, one each in "~/dev/crontabs", "~/dev/daemons" and "~dev/tools".

Here is where things get weird. In the daemons and tools workspaces SVN works properly. I don't see the .svn directories and I can do all the various SVN stuff (e.g. commit, update, cleanup) in the TEAM dialog. However, SVN isn't working in the "crontabs" workspace. The .svn directories are visible and none of the SVN dialog options are available.

In all directories, I can use the command line SVN tools and everything works fine.

Here are some more details.

  • Mac OS X 10.5.6
  • Eclipse Platform - Version: 3.4.2 - Build id: M20090211-1700
  • SVNKit Library 1.2.2.5405
  • SVNKit Client Adapter 1.5.6.1
  • Subclipse 1.4.8
  • EPIC 0.5.46

I've tried deleting the deameons .metadata and realted .profile files to try to clear it out and start a fresh workspace, but that didn't work.

Anyone seen this type of behavior before and/or know a way to get the SVN commands to work in all the workspaces instead of just some of them?

UPDATE: I should also mention that there is a bunch of other assets in the /dev directory that I don't use Eclipse for. So, I'm using the command line SVN tool in conjunction with the SVN functions in Eclipse. Everything was originally checked out with the command line tool and then I'm just using Eclipse for the commits. What's throwing me is why it works in two subdirs, but not the third while the command line works 100%.

A: 

When you switch workspaces, all the settings, etc. from other workspaces are ignored.

Instead of checking out the whole trunk, and creating 3 workspaces that coincide with your repository structure, create 3 workspaces, and checkout the relevant portions of your repository as projects for each workspace.

Zack
As far as I can tell, I setup each workspace the same way. Really the main thing was just to adjust the default SVN client over to SVNKit (since it doesn't use that automatically).I'll put another note above, but I use this in combination with the command line tool. There's a bunch of other stuff in the /dev directory that I don't have workspaces for. I'd like to be able to keep the top level checked out instead of having to check out each subdir individually (if possible) as it would be easier to maintain. If I can't figure that out, I'll switch over to individual workspaces.
anotherAlan
A: 

When you create a new project and import files into it, Eclipse does not assume that a project is version controlled. You have to explicitly tell it using the Project's Team -> Share Project... dialog.

Once you choose the correct directory, Eclipse should tell you that the project is already shared in that location, but activate the SVN commands in Eclipse for it anyway.

R. Bemrose
This is making me think I've got a bug. When I tried the Team -> Share Project, I get a message that says:"This project appears to contain Subversion metadata folders. If you continue, those folders will be deleted, and the Subversion information will be lost. In order for Subclipse to automatically reconnect a project to a repository, the project root folder needs to contain a Subversion metedata folder. Most likely it doesn't, or you would not see this message."However, there are .svn dirs in the project root and the workspace root both (and actually one level above that.)
anotherAlan
Hmm, I'm not sure what's going on. Because we work in a Windows environment where I work, we've changed some options so that subversion uses _svn folders instead of .svn folders. We use a mix of Subclipse 1.4.x (for Subversion 1.5) and TortoiseSvn 1.5.x. When I had to recreate my workspace when it got corrupted a few weeks back (Java autocomplete stopped working), I use Team -> Share Project to reattach subclipse to those projects.
R. Bemrose
I'll keep tinkering around with it, but I think what I'm seeing is not normal behavior. Especially since two of them are working. I've tried deleting the entire workspace part of the tree and pulling back down from SVN and still no luck. I think something is just buggy here.
anotherAlan
A: 

Got the same problem here, with individual workspaces.

  • Linux Mandriva 2009.1
  • Eclipse Platform version 3.4.2, Build id: M20090211-1700
  • Subclipse 1.4.8
  • SVN Client adapter: 1.5.3
  • SVNKit Library 1.2.3.5521
  • SVNKit Client Adapter 1.5.6.1

I too use both Subclipse and the svn command line client (version 1.6.1 (r37116)), and things were working fine prior a Mandriva update, so I was wondering if it could be that my version of Subclipse is incompatible with my version of svn.

A: 

I'm not sure I totally follow all that. And the Subclipse plugin isn't as polished as the CVS plugin. But if you copy a project into a workspace and it includes Subversion context (.svn folders), as Bemose has noted, that isn't meaningful to Subclipse.

In theory, when you use Team/Share and you get the warning message, you can give the go-ahead and it will nuke the existing .svn files and build new ones that are proper. If you're lucky that will even work. It does with CVS, but, as I've said, Subclipse can be more of a problem.

Your best best is to check the projects out into your workspaces using the Eclipse subversion perspective and the "Check out as Eclipse Project" option.

If you absolutely feel compelled to construct your project directories from the command line, use the Subversion export command, not the checkout command. Exporting omits the ".svn" directories, so Eclipse can do its thing without interference. However, you will have to do a Team/Share to connect the exported project to the subversion repository.

Tim H