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

Re: sequence "/@" in file path causes failure - Subversion bug?

From: B. Smith-Mannschott <bsmith.occs_at_gmail.com>
Date: Tue, 26 May 2009 07:43:03 +0200

On Mon, May 25, 2009 at 19:41, Marian Petras <marian.petras_at_sun.com> wrote:
> Hello,
>
> I am re-posting this question about a possible bug in Svn because I got
> no response on the users' mailing list (for the original e-mail, see
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2300569).
>
> I cannot 'svn add' or 'svn commit' a file if the file's name starts with
> an at sign (@) and the specified file path contains at least one
> directory element.

This is not a bug. When Subversion sees the last (or only) "@" in a
path, it expects what follows to be a peg revision. The escaping
mechanism for paths containing "@", where you don't want to specify a
peg revision is to terminate the path with "@":

/trunk/@somefile@

see also
http://svnbook.red-bean.com/en/1.5/svn.advanced.pegrevs.html

[quote]
The perceptive reader is probably wondering at this point whether the
peg revision syntax causes problems for working copy paths or URLs
that actually have at signs in them. After all, how does svn know
whether news_at_11 is the name of a directory in my tree or just a syntax
for “revision 11 of news”? Thankfully, while svn will always assume
the latter, there is a trivial workaround. You need only append an at
sign to the end of the path, such as news_at_11@. svn cares only about
the last at sign in the argument, and it is not considered illegal to
omit a literal peg revision specifier after that at sign. This
workaround even applies to paths that end in an at sign—you would use
filename@@ to talk about a file named filename@.
[/quote]

// ben

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2353684
Received on 2009-05-26 07:43:35 CEST

This is an archived mail posted to the Subversion Dev mailing list.