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

ignoring filenames with spaces

From: Rob Hubbard <rob.hubbard_at_softel.co.uk>
Date: Wed, 29 Oct 2008 13:06:54 -0000

Hello,

I would like to ignore certain filename patterns that contain spaces
in the SVN config file.

The specific example I'm interested in concerns Microsoft Windoze.
Occasionally I might make a (temporary) copy of a file using
Windoze Explorer (^C, ^V).

Following a copy of my_file.txt, I might then have
    Copy of my_file.txt
    Copy (2) of my_file.txt
and so on.

I would like to add an entry in the config file as follows:

    [miscellany]
    global-ignores =
        Copy of *

Now, obviously that doesn't work, as the space is a separator
(and, in this case, so the "*" causes every unversioned file to be
ignored).
I have tried the following variants (inspired by globbing and other
syntax)
but none of these seems to work (on Windoze):

    [miscellany]
    global-ignores =
        "Copy of *"
        Copy[ ]of[ ]*
        Copy%20of%20*
        Copy[\s]of[\s]*
        Copy\ of\ *

Using these individually, they either fail to match the required file,
or match too widely.

(I imagine that the svn:ignore property will have similar problems,
though I've not tested that.)

I do have a workaround, which is to use ? as follows:

    [miscellany]
    global-ignores =
        Copy?of?*
        Copy?([2-9])?of?*
        Copy?([1-9][0-9])?of?*

However, ? matches any single character, not just space.

An "improvement" is to use an inverted character class:

    [miscellany]
    global-ignores =
        Copy[^a-zA-Z0-9_]of[^a-zA-Z0-9_]*

and so on.

It would be good if it was possible to express matching a space
specifically.
Is this possible?

If not, please consider this a feature request.

Thanks,
Rob.

Rob Hubbard.

________________________________________________________________
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)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-10-29 14:07:27 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.