[英]How to exclude file extensions in svn root directory using svn:global-ignores command line
I'm looking for options to global ignore files and directories, I'm not interested on doing this per-directory, so svn:ignore
is not an option here, but I can't find the correct syntax for svn:global-ignore rather for listing what's in the config file:我正在寻找全局忽略文件和目录的选项,我对按目录执行此操作不感兴趣,因此svn:ignore
不是此处的选项,但我找不到 svn:global-ignore 的正确语法而不是列出配置文件中的内容:
svn pg svn:global-ignores --show-inherited-props
I would like to be able to increase the ignore list by adding new entries from svn command line.我希望能够通过从 svn 命令行添加新条目来增加忽略列表。 Any thoughts on this?对此有何想法?
I believe following command is supposed to achieve what I want:我相信以下命令应该可以实现我想要的:
svn propset svn:global-ignores *.suo .
Can someone please check if this works, because it does not for me.有人可以检查这是否有效,因为它不适合我。 Why does it require a target as 2nd parameter (.)?为什么它需要一个目标作为第二个参数 (.)?
The dot in the end of the command-line specifies the path in your local working copy where you want to modify the versioned property.命令行末尾的点指定本地工作副本中要修改版本属性的路径。 The dot represents the "PATH..." argument of the example:点代表示例的“PATH...”参数:
svn propset PROPNAME [PROPVAL | -F VALFILE] PATH...
Nevertheless, I guess that you want to use svn propedit
, not svn propset
.不过,我猜您想使用svn propedit
,而不是svn propset
。 svn propset
does not "add" property values, it completely rewrites them. svn propset
不会“添加”属性值,而是完全重写它们。 So if you run the command-line svn propset svn:global-ignores *.suo .
因此,如果您运行命令行svn propset svn:global-ignores *.suo .
the resultant property value will be just "*.suo".结果属性值将只是“*.suo”。
Read Subversion 1.8 Release Notes and SVNBook about this global ignores feature.阅读Subversion 1.8 发行说明和SVNBook 关于这个全局忽略功能。
NOTE: Items that are already in the repository will still be in the repository after you setup the ignore settings.注意:设置忽略设置后,存储库中已有的项目仍将在存储库中。 In other words, you can't ignore items that exist in the repository.换句话说,您不能忽略存储库中存在的项目。
NOTE2: Global ignores work only with Subversion 1.8 and newer clients!注意 2:全局忽略仅适用于 Subversion 1.8 和更新的客户端!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.