Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot use filter pattern for largefiles extension for hg

Tags:

mercurial

hgrc

My hgrc config files is as follow:

[extensions] largefiles =

[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. I created b.jpg,hg add b.jpg, file has been created in .hglf correctly as well.

If I do not hg add --large a.jpg first, this will be failed for some reason.

Next, I created subdirectory, created c.jpg file in there,hg add c.jpg, nothing created in .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.

like image 710
Paiboon Panusbordee Avatar asked Nov 25 '25 03:11

Paiboon Panusbordee


1 Answers

I suppose, you have to re-read 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

like image 189
Lazy Badger Avatar answered Nov 28 '25 00:11

Lazy Badger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!