Subject: | SVN::Access fails on resources with "-" character in name |
Date: | Thu, 11 Oct 2007 09:36:09 -0400 |
To: | <bug-SVN-Access [...] rt.cpan.org> |
From: | "Smith, Matt" <matt.smith [...] uconn.edu> |
Hello-
One of my Subversion repos has a "-" (dash, minus) in the name, which
causes SVN::Access to fail with:
"Invalid resource format in my-repo! (format 'repo:/path')!"
However, Subversion does not have a problem with this character.
Access.pm uses the pattern ^\w*\:*\/ to detect valid resource names.
"\w" indicates alphanumeric and '_' ([A-Za-z0-9_]). Perhaps the more
liberal "\S" should be used, as in "^\S*\:*\/".
Or, for more accuracy, the Subversion book[1] states "... path names
can only contain legal XML (1.0) characters. Subversion also prohibits
TAB, CR, and LF characters in path names ...". However, I am not sure
how to represent that as a regex, as that includes almost all of UTF-8
( [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] ).
So here is a pattern that I t*think* covers the majority of allowed
characters, and further limits repo names to either "repo:/path" or
"/path" :
/^(\S+\:)?\/\S*$/
Minimally, please consider "^\S*\:*\/".
Thank you,
-Matt
[1]http://svnbook.red-bean.com/
--
Matt Smith
matt.smith@uconn.edu
University Information Technology Services (UITS)
University of Connecticut
PGP Public Key: http://web.uconn.edu/dotmatt/matt.asc
Message body not shown because it is not plain text.