[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn:ignore Question

From: Paul Lussier <pll_at_lanminds.com>
Date: 2003-07-21 16:31:44 CEST

In a message dated: Fri, 18 Jul 2003 16:23:22 PDT
Justin Erenkrantz said:

>Namely, I believe fnmatch doesn't support [xyz]* expressions. I could be
>wrong, but that's what the Solaris man page on fnmatch(5) leads me to
>believe.

Prior to your explanation, I had no knowledge of how svn dealt with
regexes. However, after reading the man page for fnmatch(3) for
Linux, I find that it simply states:

    The fnmatch() function checks whether the string argument
    matches the pattern argument, which is a shell wildcard
    pattern.

So, if it's a 'shell wildcard pattern' then it *should* support
character class ( [n-m]* ) expressions. Since (on linux) fnmatch(3)
refers to glob(7), I reviewed that man page, which says:

   The rules are as follows (POSIX 1003.2, 3.13).

  WILDCARD MATCHING
   Character classes
     An expression `[...]' where the first character after the
     leading `[' is not an `!' matches a single character,
     namely any of the characters enclosed by the brackets.
     ...
        
   Ranges
     There is one special convention: two characters separated
     by `-' denote a range.
     ...

Which seems to indicate it *should* handle character classes and
ranges. However, glob(3) also goes on to say:

NOTES
   Regular expressions
       Note that wildcard patterns are not regular expressions,
       although they are a bit similar. First of all, they match
       filenames, rather than text, and secondly, the conventions
       are not the same: e.g., in a regular expression `*' means
       zero or more copies of the preceding thing.

       Now that regular expressions have bracket expressions
       where the negation is indicated by a `^', POSIX has
       declared the effect of a wildcard pattern `[^...]' to be
       undefined.

So, IMO, [m-n]* _should_ work, but the above leads me to believe that
it might not :)

Anyone know for certain either way?

-- 
Seeya,
Paul
--
Key fingerprint = 1660 FECC 5D21 D286 F853  E808 BB07 9239 53F1 28EE
	It may look like I'm just sitting here doing nothing,
   but I'm really actively waiting for all my problems to go away.
	 If you're not having fun, you're not doing it right!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jul 21 17:41:34 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.