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

RE: How to specify global-ignores containing space?

From: Rob Hubbard <rob.hubbard_at_softel.co.uk>
Date: Thu, 22 Jan 2009 09:25:49 -0000

Hello Henrik,

I've had a similar problem. I wanted to exclude the Windoze 'Copy of
...' files, which contain spaces, even if the original files do not. I
had the same problem: not being able to specify a space character. I
tried the following, none of which worked:

        ' ' - because, like any whitespace, it's interpreted as a
separator in the list
        '" "'
        '\ '
        '[ ]' - because it's a glob, not a regex
        '\s' - ditto
        '[\s]' - ditto
        '[[:space:]]' - ditto
        '%20'

These did work (although they will match and therefore ignore a little
too much):

        '?' - i.e. glob metacharacter meaning any single character
(including a single space)
        '[^a-zA-Z0-9_]' - i.e. a glob character class for a single
character containing most other valid filename characters

I opted for '?', although '[^a-zA-Z0-9_]' is slightly better in terms of
what it matches, because '?' is so much easier to read.

Thus to ignore the 'Copy of ...' files, I used the following patterns:

        Copy[!a-zA-Z0-9_]of[!a-zA-Z0-9_]*
        Copy[!a-zA-Z0-9_]([2-9])[!a-zA-Z0-9_]of[!a-zA-Z0-9_]*
        Copy[!a-zA-Z0-9_]([1-9][0-9])[!a-zA-Z0-9_]of[!a-zA-Z0-9_]*

If you wish to ignore certain 'user' files, I've found it useful to put
a couple of underscores near the end of the filename to mean 'ignore
me'. For example:

        my_file__.txt
        my_file.txt__

The patterns for these are:

        *__.*
        *__

Hope this helps (a bit), though it's not a full answer,

Rob.

Rob Hubbard

> -----Original Message-----
> From: Henrik Sundberg [mailto:storangen_at_gmail.com]
> Sent: 21 January 2009 14:53
> To: users_at_subversion.tigris.org
> Subject: How to specify global-ignores containing space?
>
> I tried to add "My File" to the global-ignores, but that didn't work
> (i.e. global-ignores = "My File").
> Changing to My*File (i.e. global-ignores = My*File) worked though.
>
> How can space be a part of what to ignore?

________________________________________________________________
This message has been independently scanned for the Softel Group and cleared of containing viruses and other malicious data.

Powering Television Beyond the Video (TM)

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1042974

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-22 10:26:53 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.