You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Rob Hubbard <ro...@softel.co.uk> on 2008/10/29 13:06:54 UTC
ignoring filenames with spaces
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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
RE: ignoring filenames with spaces
Posted by Rob Hubbard <ro...@softel.co.uk>.
> 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\ *
I also tried
Copy[[:space:]]of[[:space:]]*
that too does not work.
Thus it looks as though SVN does not quite implement full
globbing syntax.
> 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.
Having read the Linux/Cygwin man page on globbing,
it seems that that should probably instead be
Copy[!a-zA-Z0-9_]of[!a-zA-Z0-9_]*
(which works in SVN)
as the [^...] syntax is "undefined" by POSIX.
(I don't know if that's entirely relevant to SVN.)
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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org