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

Re: Issue 2728: Negated glob patterns for svn:ignore and global ignores

From: Alan Barrett <apb_at_cequrux.com>
Date: 2007-03-26 08:55:52 CEST

On Sun, 25 Mar 2007, Erik Huelsmann wrote:
> Issue 2728 adds a patch to negate global ignore patterns. I think this
> is usefull, but it uses the (quite normal) '!' negation character.
> In our API we currently don't define any special characters other than
> the normal globbing characters. So, committing this patch would break
> our API. Now, I know we weren't supposed to do that. However, since
> there's *no* provision whatsoever for escaping characters either,
> there would be no other way than to post-pone to 2.0. That would be -
> IMO - overkill for a change this small.

You might find that enclosing a special character in square brackets
serves to quote it in a globbing context. This is likely to work for
[*] and [?], (which have special meanings outside square brackets), and
for []] and [[] (square brackets themselves), but not for [!] (which
currently has no special meaning outside square brackets, but does have
a special meaning as the first character inside square brackets).

Users who have files whose names begin with '!', and who want to mention
such files in ignore lists, could possibly use a construct like [x!] to
work around the quoting problem. This would match either an x or an
exclamation mark. By careful choice of x (e.g. using an asterisk or any
other character that is unlikely to appear in a file name), they could
get almost the desired effect of a pattern that matches the files they
want to match, is unlikely to match files they don't want to match, and
doesn't get interpreted as the new negation syntax.

--apb (Alan Barrett)

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 26 08:56:16 2007

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.