java IntelliJ 和 svn:ignore
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7714227/
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
IntelliJ and svn:ignore
提问by Michael Wiles
IntelliJ does not seem to honour svn:ignore
IntelliJ 似乎并不尊重 svn:ignore
I use Maven to generate classes based on an annotation processor. These classes are compiled into target/generated-sources/apt
我使用 Maven 基于注释处理器生成类。这些类被编译成 target/generated-sources/apt
I add an svn:ignore
to the target directory (placed in the parent of target) but IntelliJ still wants to commit the directory.
我将一个添加svn:ignore
到目标目录(放置在目标的父目录中),但 IntelliJ 仍想提交该目录。
When I select Subversion -> Commit this directory is selected to be committed.
当我选择 Subversion -> Commit 时,选择提交这个目录。
I cannot use the exclude option in the module properties as this directory includes source code, so it must not be excluded, it must just not be checked in. Nor can I use a global filter as it's not any specific extension I want to ignore, it is a whole directory and all the sub-directories.
我不能在模块属性中使用 exclude 选项,因为此目录包含源代码,因此不能排除它,不能将其签入。我也不能使用全局过滤器,因为它不是我想忽略的任何特定扩展,它是一个完整的目录和所有的子目录。
BTW, I'm using IntelliJ 10.5 running on Ubuntu and SVN 1.6
顺便说一句,我正在使用在 Ubuntu 和 SVN 1.6 上运行的 IntelliJ 10.5
回答by Olivier Faucheux
With the setting Settings > Version Control > Confirmation > When files are created
set to Add silently
, the file is directly added to the subversion local repository. The command ignore
of the context menu is afterwards grayed out.
随着设置Settings > Version Control > Confirmation > When files are created
设置Add silently
,将文件直接添加到颠覆本地仓库。ignore
上下文菜单的命令随后变灰。
I found no solution but to change this setting, delete the file and create it again.
我找不到解决方案,只能更改此设置,删除文件并重新创建。
回答by Ruslan Popenko
Setting of ignored files in IntelliJ IDEA (Settings
| Version Control
| Ignored Files
) doesn't work for svn repo. This variant applicable as IDEA configuration only.
IntelliJ IDEA ( Settings
| Version Control
| Ignored Files
) 中忽略文件的设置不适用于 svn repo。此变体仅适用于 IDEA 配置。
To configure this for svn repo you need to define svn:ignore
property. To do that you need select folder location where placed ignored files or folders (usually it's root project directory). Next on top menu choose VCS > Subversion > Edit properties
. Then you can see SVN Properties
dialog, you need define svn:ignore
property with value of ignored files or directories (separated with enter).
要为 svn repo 配置它,您需要定义svn:ignore
属性。为此,您需要选择放置忽略文件或文件夹的文件夹位置(通常是项目根目录)。下一步在顶部菜单中选择VCS > Subversion > Edit properties
。然后你可以看到SVN Properties
对话框,你需要svn:ignore
用忽略的文件或目录的值定义属性(用回车分隔)。