如何递归配置 svn status 以隐藏被忽略的文件? [英] How can I recursively configure svn status to hide ignored files?

查看:25
本文介绍了如何递归配置 svn status 以隐藏被忽略的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目录结构如下:

project/
    app1/
    app2/
    settings.py

project 目录中,我运行 svn propedit svn:ignore . 这只会忽略来自项目主管内的文件,不包括其子目录.我可以从每个文件夹中再次运行 svn ignore 并且它会工作.是否有内部 svn 命令或选项可以递归地为我执行此操作,还是我应该求助于脚本在我的项目的每个子文件夹中执行忽略?

From within the project directory, I ran svn propedit svn:ignore . This only ignore files from within project director excluding its sub-directories. I can run the svn ignore again from within each of the folder and it will work. Is there an internal svn command or option which can recursively do it for me or should I resort to a script to perform the ignore within each sub-folders of my project?

我已将忽略的文件设置为:

I've set my ignored files to be:

*.pyc
*.swp

然而,每当我做一个svn status时,我仍然看到上面的文件.有没有办法告诉 svn status 递归隐藏被忽略的文件?

However, whenever I do a svn status, I still see the above files. Is there a way to tell svn status to hide ignored files recursively?

推荐答案

svn propedit 一次只能作用于一个目标.TortoiseSVN 有一个递归应用属性的选项,但如果你不使用它或其他有该选项的 GUI,你必须用脚本来完成.

svn propedit only works on one target at a time. TortoiseSVN has an option to apply properties recursively, but if you’re not using it or another GUI that has that option, you would have to do it with a script.

但是,您真正应该做的是设置您的global-ignores 以忽略您提到的两种文件模式.根据最新文档*.pyc*.swp 包含在 Subversion 1.6 的默认忽略中,但如果您的 config 文件没有,您可以添加它们拥有它们.

However, what you should really do is set your global-ignores to ignore the two file patterns you mentioned. According to the most recent documentation, *.pyc and *.swp are included in the default ignores for Subversion 1.6, but you can add them if your config file doesn’t have them.

config 文件的位置取决于平台;请参阅上面的文档链接.global-ignores 位于 miscellany 部分.

The location of your config file is platform-dependent; see the above documentation link. global-ignores is in the miscellany section.

这篇关于如何递归配置 svn status 以隐藏被忽略的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆