Mercurial hgignore

Sean schliden at gmail.com
Mon Mar 19 10:17:07 CDT 2007


Christian,

Thanks for taking the time to explain the regexp.

Still doesn't work.... sorry.

global.hgignore looks like this

syntax: glob

*.lnk
*.log
*.gif
*.GIF
*.jpg
*.JPG
*.jpeg
*.JPEG
*.png
*.PNG

This works as expected.

If I replace this completely with:

syntax: regexp
(?i)\.(jpe?g|png)$

I see image files again when i do a status.

Sean

On 3/20/07, Christian Höltje <docwhat+list.mercurial at gerf.org> wrote:
> Marcin Kasperski wrote:
> >> For instance, there must be a simpler way of doing this sort
> >> of thing:
> >>
> >> *.jpg
> >> *.JPG
> >> *.jpeg
> >> *.JPEG
> >> *.png
> >> *.PNG
> >
> > What about:
> >
> > syntax: regexp
> >
> > (?i)\.jpe?g
> > (?i)\.png
>
> They should probably have a $ at the end.
>
> syntax: regexp
> (?i)\.(jpe?g|png)$
>
> Breakdown of what it all is doing:
> (?i) -- this makes the search case insensitive
> \.   -- periods (dots) need to be escaped.  They normally
> match any one character.
> (..|..) -- This says look for one of the things in the
> parenthesis.  Each possibility is separated by a |.  So
> (aa|bb|cc) would match aa or bb or cc, but not all.
> e?  -- This says match 0 or 1 'e' characters.
> $   -- This is the end of string.
>
> Ciao!
>
>
> --
> When privacy is outlawed... only the outlaws have privacy.
>
> The Doctor What: Guru to the Gods
> http://docwhat.gerf.org/
> docwhat *at* gerf *dot* org
>        KF6VNC
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>



More information about the Mercurial mailing list