简体   繁体   English

对于hg的大文件扩展名,不能使用过滤器模式

[英]Cannot use filter pattern for largefiles extension for hg

My hgrc config files is as follow: 我的hgrc配置文件如下:

[extensions] largefiles = [extensions] largefiles =

[largefiles] patterns = *.jpg *.png *.bmp *.gif *.mp3 *.a *.jar *.psd *.ai *.unity *.ttf *.zip *.rar [largefiles] patterns = * .jpg * .png * .bmp * .gif * .mp3 * .a * .jar * .psd * .ai * .unity * .ttf * .zip * .rar

I tested by created a file a.jpg ,hg add --large a.jpg , file has been created in .hglf correctly. 我测试了创建了一个文件a.jpg ,hg add --large a.jpg ,文件已经在.hglf正确创建了。 I created b.jpg ,hg add b.jpg , file has been created in .hglf correctly as well. 我创建了b.jpg ,hg add b.jpg ,文件也在.hglf正确创建。

If I do not hg add --large a.jpg first, this will be failed for some reason. 如果我不首先添加--large a.jpg,这将由于某种原因失败。

Next, I created subdirectory, created c.jpg file in there,hg add c.jpg, nothing created in .hglf. 接下来,我创建了子目录,在那里创建了c.jpg文件,hg add c.jpg,没有在.hglf中创建。 This make the filter pattern not work anymore after it's in subdirectory. 这使得过滤器模式在子目录中不再起作用。 What should I do to be able to "hg add *" for all file in repo and it filter correctly for which one is text file, which one is binary file as config in .hgrc config file. 我应该怎么做才能为repo中的所有文件“hg add *”并正确过滤哪一个是文本文件,哪一个是.hgrc配置文件中的二进制文件配置。

I suppose, you have to re-read hg help patterns 我想,你必须重新阅读hg help patterns

  *.c any name ending in ".c" in the current directory **.c any name ending in ".c" in any subdirectory of the current directory including itself. 

and fix your patterns 并修复你的模式

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM