subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Brodbeck <bro...@uw.edu>
Subject Re: Square brackets in file names and authz (in VisualSVN 2.5.5)
Date Thu, 12 Jul 2012 00:20:15 GMT
On Wed, Jul 11, 2012 at 8:01 AM, Matthew Pounsett <matt@conundrum.com> wrote:
> I note by your examples that you're using a unix filesystem (as opposed to Windows).
 I would be a little surprised if this worked there, since the square brackets are normally
used by unix shells as glob metacharacters, similarly to * and ?.

Just because they're used as shell metacharacters doesn't mean they
aren't legal in filenames:

brodbd@patas:~/foo$ touch \*foo\*
brodbd@patas:~/foo$ touch \?bar\?
brodbd@patas:~/foo$ touch \[biz\]
brodbd@patas:~/foo$ ls -l
total 2
-rw-r--r-- 1 brodbd brodbd 0 Jul 11 17:17 ?bar?
-rw-r--r-- 1 brodbd brodbd 0 Jul 11 17:17 [biz]
-rw-r--r-- 1 brodbd brodbd 0 Jul 11 17:17 *foo*

That's not to say they're a good *idea*, as they tend to make
scripting tricky, but the filesystem won't complain.

>> It's also worth pointing out that some paths have the "#" character in them. What
do I do when I get to those?
>
> This is commonly comment character.  It's possible to create a file with this character
in it, but personally I'd avoid it.  It's possible you could escape it like so: "tmp\#1.txt",
but I'm not confident that will work.  If svn can't deal with this one you might have a case
for it being a bug, since it is technically a legal file name.

emacs uses files starting and ending in "#" extensively for autosave
recovery data, FWIW.


-- 
David Brodbeck
System Administrator, Linguistics
University of Washington

Mime
View raw message