[英]svn:ignore for a complicated directory structure
i have a directory structure like this: 我有这样的目录结构:
home/ 家/
- application/
- images/
- temporary/
scripts/
js/
cache/
uploads/
Now i want to keep my temporary directory and all the sub-directories like (scripts, js, cache, upload....) in the svn, but i want to svn:ignore all the content which is inside directories, so that every time i execute svn status -u, data from temporary directory won't list. 现在我想将我的临时目录和所有子目录(例如,脚本,js,缓存,上载...)保留在svn中,但是我想svn:忽略目录中的所有内容,以便每个当我执行svn status -u时,临时目录中的数据将不会列出。
I am using linux. 我正在使用linux。 and using following commands:
并使用以下命令:
svn propset svn:ignore "*" . svn propset svn:ignore“ *”。
and then commit -m 'text' 然后提交-m'text'
i can see temporary directory listed when executing this command: 执行此命令时,我可以看到列出的临时目录:
svn propget svn:ignore svn propget svn:ignore
SVN Book must be your best friend for a long time. SVN Book 必须长期以来是您最好的朋友 。
Re-read carefully description of svn:ignore property in "Chapter 3. Advanced Topics" - "Properties" - Subversion's Reserved Properties topic and detect 3 your mistakes 重新阅读“第3章,高级主题”-“属性” -Subversion的“保留属性”主题中的svn:ignore属性的详细说明,并发现3个错误
If you still will not be able to do it 如果您仍然无法做到这一点
svn:ignore
If present on a directory , the value is a list of unversioned file patterns to be ignored by svn status and other subcommands.
如果存在于目录中 ,则该值是svn status和其他子命令将忽略的未版本化文件模式的列表。
means: 手段:
<somedir>
then svn:ignore must be defined for <somedir>
, for every <somedir>
, not just once somewhere <somedir>
文件,则必须为<somedir>
定义 svn:ignore,对于每个<somedir>
,而不仅仅是某个位置 Thus: 从而:
?
?
, but parent directories - exist already in repo svn propset svn:ignore "*" .
must be executed not in outer space blindly but after cd
to every parent dir, 4 times cd
到每个父目录之后执行4次 /home
???) wrong svn propset svn:ignore "*" .
/home
???)中执行了错误的svn propset svn:ignore "*" .
must be found and undo'ed ( svn pd ...
) svn pd ...
) If you are using svn version >= 1.7 you may consider the set-depth option, so that files will remain on the svn but you will not have them and not track them in your working copy. 如果您使用的是svn版本> = 1.7,则可以考虑使用set-depth选项,这样文件将保留在svn上,但不会包含它们,也不会在工作副本中跟踪它们。
svn update --set-depth='immediates' temporary svn update --set-depth ='immediates'临时
to revert use --set-depth='infinity' 恢复使用--set-depth ='infinity'
and to check your working copies against svn server use both svn list
and svn info
commands. 并根据svn服务器检查您的工作副本,请同时使用
svn list
和svn info
命令。
Is that what you want ? 那是你要的吗 ?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.