为什么Subclipse仅适用于某些Ecliplse工作区而不适用于其他工作区?

时间:2022-09-25 14:12:49

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

我正在使用Eclipse与Subclipse进行一些perl开发。 Subversion存储库设置如下:

  • /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".

在文件系统上,我在本地检查整个/ repos / dev树到〜/ dev并创建了三个Eclipse工作区,每个工作区分别在“〜/ dev / crontabs”,“〜/ dev / daemons”和“~dev /工具”。

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.

这是事情变得奇怪的地方。在守护进程和工具工作空间中,SVN正常工作。我没有看到.svn目录,我可以在TEAM对话框中执行所有各种SVN内容(例如提交,更新,清理)。但是,SVN不在“crontabs”工作区中工作。 .svn目录是可见的,并且没有SVN对话框选项可用。

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

在所有目录中,我可以使用命令行SVN工具,一切正常。

Here are some more details.

这里有一些更多的细节。

  • Mac OS X 10.5.6
  • Mac OS X 10.5.6

  • Eclipse Platform - Version: 3.4.2 - Build id: M20090211-1700
  • Eclipse平台 - 版本:3.4.2 - 构建ID:M20090211-1700

  • SVNKit Library 1.2.2.5405
  • SVNKit Library 1.2.2.5405

  • SVNKit Client Adapter 1.5.6.1
  • SVNKit客户端适配器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.

我已经尝试删除deameons .metadata和realted .profile文件以尝试清除它并启动一个新的工作区,但这不起作用。

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?

有没有人在之前看到过这种行为和/或知道如何让SVN命令在所有工作空间中工作而不仅仅是其中一些?

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%.

更新:我还应该提到/ dev目录中有很多其他资产我不使用Eclipse。所以,我正在使用命令行SVN工具和Eclipse中的SVN函数。最初使用命令行工具检查了所有内容,然后我只是使用Eclipse进行提交。抛出我的是为什么它在两个子目录中工作,而不是第三个,而命令行工作100%。

3 个解决方案

#1


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.

不是检出整个主干,而是创建与存储库结构一致的3个工作空间,而是创建3个工作空间,并将存储库的相关部分签出为每个工作空间的项目。

#2


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.

当您创建新项目并将文件导入其中时,Eclipse不会假定项目受版本控制。您必须使用Project的Team - > Share Project ...对话框明确告诉它。

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.

一旦选择了正确的目录,Eclipse应该告诉您项目已经在该位置共享,但无论如何都要在Eclipse中激活SVN命令。

#3


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.

我不确定我是完全遵循这一切的。而Subclipse插件并不像CVS插件那样精致。但是如果你将项目复制到工作区并且它包含Subversion上下文(.svn文件夹),正如Bemose所指出的那样,这对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.

从理论上讲,当您使用Team / Share并获得警告消息时,您可以批准它,它将对现有的.svn文件进行核对,并构建适当的新文件。如果你很幸运,甚至会工作。它与CVS有关,但是,正如我所说,Subclipse可能更容易出问题。

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.

您最好的方法是使用Eclipse subversion透视图和“Check out as Eclipse Project”选项将项目检入工作区。

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.

如果您绝对不得不从命令行构建项目目录,请使用Subversion导出命令,而不是checkout命令。导出省略了“.svn”目录,因此Eclipse可以不受干扰地完成任务。但是,您必须执行Team / Share才能将导出的项目连接到subversion存储库。

#1


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.

不是检出整个主干,而是创建与存储库结构一致的3个工作空间,而是创建3个工作空间,并将存储库的相关部分签出为每个工作空间的项目。

#2


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.

当您创建新项目并将文件导入其中时,Eclipse不会假定项目受版本控制。您必须使用Project的Team - > Share Project ...对话框明确告诉它。

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.

一旦选择了正确的目录,Eclipse应该告诉您项目已经在该位置共享,但无论如何都要在Eclipse中激活SVN命令。

#3


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.

我不确定我是完全遵循这一切的。而Subclipse插件并不像CVS插件那样精致。但是如果你将项目复制到工作区并且它包含Subversion上下文(.svn文件夹),正如Bemose所指出的那样,这对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.

从理论上讲,当您使用Team / Share并获得警告消息时,您可以批准它,它将对现有的.svn文件进行核对,并构建适当的新文件。如果你很幸运,甚至会工作。它与CVS有关,但是,正如我所说,Subclipse可能更容易出问题。

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.

您最好的方法是使用Eclipse subversion透视图和“Check out as Eclipse Project”选项将项目检入工作区。

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.

如果您绝对不得不从命令行构建项目目录,请使用Subversion导出命令,而不是checkout命令。导出省略了“.svn”目录,因此Eclipse可以不受干扰地完成任务。但是,您必须执行Team / Share才能将导出的项目连接到subversion存储库。