Eclipse svn 忽略垃圾箱

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1323121/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:58:43  来源:igfitidea点击:

Eclipse svn ignore bin

eclipsesvn

提问by rwallace

Eclipse project, I have Subversion set to ignore the bin directory, and also within Eclipse I added bin to the list of ignored resources.

在 Eclipse 项目中,我将 Subversion 设置为忽略 bin 目录,并且在 Eclipse 中我将 bin 添加到忽略资源列表中。

However, every now and then Eclipse puts a .svn directory into bin anyway. This doesn't interfere with Subversion checkins (as the Subversion commandline client obeys the standing directive to ignore the entire bin directory) but it does mess up the display in TortoiseSVN.

但是,Eclipse 会时不时地将 .svn 目录放入 bin 中。这不会干扰 Subversion 签入(因为 Subversion 命令行客户端遵守忽略整个 bin 目录的常设指令),但它确实会弄乱 TortoiseSVN 中的显示。

Is there a known fix or workaround for this?

是否有已知的修复或解决方法?

(Eclipse 3.5, Windows Vista.)

(Eclipse 3.5,Windows Vista。)

回答by Brian Alexander

It looks like what is actually happening is that eclipse is copying the .svn directory from your source directories as part of its build -- it thinks it is a "resource" to be copied to your output bin directory. To get it to stop doing that, you can add .svn/as a filtered resource. In the Properties dialog for your workspace or for your project, go to: Java Compiler | Building and add ".svn" to the list of 'Filtered resources:' under 'Output folder'.

看起来实际发生的事情是 eclipse 正在从您的源目录中复制 .svn 目录作为其构建的一部分——它认为这是一个要复制到输出 bin 目录的“资源”。要让它停止这样做,您可以添加.svn/为过滤资源。在工作区或项目的“属性”对话框中,转至:Java 编译器 | 构建“.svn”并将其添加到“输出文件夹”下的“过滤资源:”列表中。

I haven't tried it but I wouldn't be surprised if installing one of the subversion plugins for eclipse also filters the .svn directories for you so anyone with a subversion plugin installed wouldn't notice this problem.

我还没有尝试过,但如果为 Eclipse 安装一个 subversion 插件也会为您过滤 .svn 目录,因此任何安装了 subversion 插件的人都不会注意到这个问题,我不会感到惊讶。

回答by Gid

After a long search, starting from this and similar posts I finally fixed this with the help of http://www.damonkohler.com/2009/07/make-eclipse-ignore-svn-directories.html

经过长时间的搜索,从这个和类似的帖子开始,我终于在http://www.damonkohler.com/2009/07/make-eclipse-ignore-svn-directories.html的帮助下解决了这个问题

The source folder pattern that worked for me is slightly different then the one given on the blog however, namely "****/.svn/"** instead of "****/.svn***"

对我有用的源文件夹模式与博客上给出的模式略有不同,即“****/.svn/”**而不是“****/.svn***”

Without the first step, the second step (which has also been mentioned before as a solution) has no effect according to my experience. Thanks Daemon!

没有第一步,根据我的经验,第二步(之前也提到过作为解决方案)是没有效果的。谢谢守护!

The recipe:

食谱:

1. Project > Properties > Java Build Path For each source folder, edit Excluded to include the pattern "****/.svn/"**

1. Project > Properties > Java Build Path 对于每个源文件夹,编辑 Excluded 以包含模式“****/.svn/”**

2. Project > Properties > Java Compiler > Building > Enable project specific settings Check the box.

2. Project > Properties > Java Compiler > Building > Enable project specific settings 选中该框。

Project > Properties > Java Compiler > Building > Output folder > Filtered resources Add ".svn/" so that it reads "*.launch, .svn/"

Project > Properties > Java Compiler > Building > Output folder > Filtered resources 添加“.svn/”,使其显示为“*.launch, .svn/”

回答by David

In my experience, installing Subversiveprevents Eclipse from copying the .svn folders to the build directory.

根据我的经验,安装Subversive 会阻止 Eclipse 将 .svn 文件夹复制到构建目录。

回答by Ironluca

I am using Eclipse Photon with Totoise SVN 1.10.0 (on Windows 10-64 bit), I have faced the above problem, the solution that worked for me was to include an exclusion filter to src -> build path -> Configure Inclusion/Exclusion Filter (as mentioned by Gid partly above, the pattern mentioned did not work for me), however, for me it was enough to include the exclusion filter, the pattern I used is ".svn/", refer image below.

我正在使用 Eclipse Photon 和 Totoise SVN 1.10.0(在 Windows 10-64 位上),我遇到了上述问题,对我有用的解决方案是将排除过滤器包含到 src -> 构建路径 -> 配置包含/排除过滤器(正如上面 Gid 部分提到的,提到的模式对我不起作用),但是,对我来说,包含排除过滤器就足够了,我使用的模式是“.svn/”,参考下图。

enter image description here

在此处输入图片说明

回答by James E. Ervin

Which SVN plugin are you using? Subclipse or Subversive? It is not an Eclipse problem per se, but rather it sounds like a problem with the particular eclipse plugin you are using for SVN. It could be that there needs to be a problem report written for that plugin.

您使用的是哪个 SVN 插件?子剪辑还是颠覆?这本身不是 Eclipse 问题,而是听起来像是您用于 SVN 的特定 Eclipse 插件的问题。可能需要为该插件编写问题报告。

回答by James E. Ervin

Hmm that is very strange indeed. Goto your plugins directory or look at Help > About Eclipse and check to see which plugins you have installed. Look for something with svn, subversion, or polarion, if they are there then you probably have an issue with that plugin interfering.

嗯,这确实很奇怪。转到您的插件目录或查看帮助 > 关于 Eclipse 并检查您安装了哪些插件。寻找带有 svn、subversion 或 polarion 的东西,如果它们在那里,那么您可能会遇到该插件干扰的问题。

If not, I think you could have something going on with your installation of subversion(Tortoise SVN). It would then be very very unlikely Eclipse is causing this issue.

如果没有,我认为您可能会在安装 subversion(Tortoise SVN) 时遇到问题。Eclipse 导致此问题的可能性很小。

Btw, I have seen miscellaneous issues with not only Eclipse SVN plugin support (I wish the svn plugins were half as good as Eclipse CVS support), but with the command line subversion tools sometimes. It could be an issue with the version of Subversion you are using or something you are doing/not doing with svn. Check to make sure that the property svn:ignore is set correctly. You can do that with svn pl, don't be surprised if the property is not set correctly to ignore bin. Remember the delimiter in that case is not comma, but a new line.

顺便说一句,我不仅看到了 Eclipse SVN 插件支持的杂项问题(我希望 svn 插件是 Eclipse CVS 支持的一半),而且有时还使用命令行颠覆工具。这可能是您使用的 Subversion 版本的问题,或者您正在/未使用 svn 做的事情。检查以确保属性 svn:ignore 设置正确。您可以使用 svn pl 来做到这一点,如果该属性未正确设置为忽略 bin,请不要感到惊讶。请记住,这种情况下的分隔符不是逗号,而是一个新行。

Good Luck

祝你好运

回答by Rich_LogicBox

Non of the above worked for me, but trashing and re-creating the eclipse project did:

以上都不对我有用,但是破坏并重新创建 eclipse 项目确实做到了:

  • Delete your project from eclipse (not from disk).
  • "File"->"New.."->"Project"->"Android Project"
  • in "New Adroid Project"-Dialog selected "create project from existing source" (find your project on HDD)->"Finish"
  • 从 eclipse(而不是从磁盘)中删除您的项目。
  • “文件”->“新建..”->“项目”->“Android 项目”
  • 在“新建 Adroid 项目”-对话框中选择“从现有源创建项目”(在 HDD 上找到您的项目)->“完成”

(as instructed from link)

(按照链接的指示)