Enh: Windows: add support for "ignorecase" matches to .hgignore

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Enh: Windows: add support for "ignorecase" matches to .hgignore

Bela Babik
Enh: Windows: add support for "ignorecase" matches to .hgignore

Would be a nice feature.

It doesn't need to be line-by-line base, it could be implemented as a
modifier or new kind of pattern type. ("regexp,i" or "regexpi" or
something like that)

teki
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
Reply | Threaded
Open this post in threaded view
|

Re: Enh: Windows: add support for "ignorecase" matches to .hgignore

Marcin Kasperski
Dnia piątek, 13 lipca 2007 06:31, Bela Babik napisał:
> Enh: Windows: add support for "ignorecase" matches to
> .hgignore
>
> It doesn't need to be line-by-line base, it could be
> implemented as a modifier or new kind of pattern type.
> ("regexp,i" or "regexpi" or something like that)

Python regexp syntax already handle ignorecase. Just add (?i)
inside regexp. Example:

>>> import re
>>> print re.search('\.bak$', 'blabla.bak')
<_sre.SRE_Match object at 0xb7db2608>
>>> print re.search('\.bak$', 'blabla.BAK')
None
>>> print re.search('(?i)\.bak$', 'blabla.BAK')
<_sre.SRE_Match object at 0xb7db2608>

So, just use this syntax in your .hgignore
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial