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

Re: pattern for specifying svn:ignore for files without extension

From: Ryan Schmidt <subversion-2010d_at_ryandesign.com>
Date: Thu, 2 Dec 2010 08:59:44 -0600

On Dec 2, 2010, at 08:43, Luke Imhoff wrote:
> On Thu, 2010-12-02 at 00:31 -0600, Daniel Shahaf wrote:
>> svn:ignore patterns are apr_fnmatch() patterns, and apr_fnmatch() does
>> accept regex-like [a-z] expressions in its patterns, so you could try
>>
>> [a-z][a-z][a-z][a-z][a-z]
>>
>> to ignore all 5-lowercase-character filenames. :-)
>
> If it accepts regex,

It doesn't. Daniel said it accepts "regex-like ... expressions". In fact, looking at the source code, I would rather say that it accepts glob-like expressions. The comments at the top of the function in the source code have all the details about the syntax that is supported:

http://apr.apache.org/docs/apr/1.3/apr__fnmatch_8h-source.html#l00067

> why not just use the original criteria where it
> excludes extensions:
>
> [^.]*

In particular, the syntax described states that "*" matches "zero or more characters". It does not mean, as it does in regular expression syntax, "zero or more of the preceding". So I don't think what you describe is possible to do with the available syntax.
Received on 2010-12-02 16:00:31 CET

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

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