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

Re: Special Character Inconsistencies

From: Ryan Schmidt <subversion-2008c_at_ryandesign.com>
Date: Wed, 1 Oct 2008 00:53:01 -0500

On Oct 1, 2008, at 12:42 AM, Daniel Becroft wrote:

> Ryan Schmidt wrote:
>
>> On Sep 30, 2008, at 10:02 PM, Daniel Becroft wrote:
>>
>>> I have come across what appear to be inconsistencies with
>>> the handling
>>> of special characters (ie '?') in filenames for URL-based renames &
>>> deletes.
>>>
>>> Examples:
>>>
>>>> svn list svn://localhost/rename_test
>>> alpha.txt
>>>
>>>> svn rename svn://localhost/rename_test/alpha.txt
>>> svn://localhost/rename_test/alpha?.txt
>>> svn: URL 'svn://localhost/rename_test/alpha?.txt' is
>>> not properly
>>> URI-encoded
>>>
>>> This is an expected error. So, use the percentage notation:
>>>
>>>> svn rename svn://localhost/rename_test/alpha.txt
>>> svn://localhost/rename_test/alpha?.txt
>>
>> Presumably you meant:
>>
>> svn rename svn://localhost/rename_test/alpha.txt
>> svn://localhost/ rename_test/alpha%3F.txt
>
> Apologies, yes, that is what I meant. Copied the wrong line from the
> console.
>
>>> Committed revision X.
>>>
>>>> svn list svn://localhost/rename_test
>>> alpha?.txt
>>>
>>> It appears the rename has worked. But, we cannot rename the
>>> file back:
>>>
>>>> svn rename svn://localhost/rename_Test/alpha%3F.txt
>>> svn://localhost/rename_Test/alpha.txt --message ""
>>> svn: Can't open file
>>> 'D://svnrepos/rename_Test/alpha?.txt/format':
>>> The filename,
>>> directory name, or volume label syntax is incorrect.
>>
>> I'm unable to reproduce the problem using file:-protocol URLs...
>> Didn't try the other protocols.
>
> I'll give it a go on the file:// protocol, but I'm guessing I'll have
> the same issue.
>
>>> I get the same errors if I attempt to move the file to a different
>>> location.
>>>
>>>> svn delete svn://localhost/rename_Test/alpha%3F.txt --message ""
>>>
>>> Committed revision 6.
>>>
>>> Now, I'm not sure where the problem lies. Should these names even be
>>> allowed? If so, then the rename obviously needs to be fixed.
>>
>> I'm using Subversion 1.5.2 on an Intel Mac running Mac OS X 10.4.11.
>> What about you?
>
> Subversion 1.5.2 on WinXP SP3. Haven't got a non-windows box to
> test on.

Oh yes, sorry, I should have guessed that from "Can't open file 'D://
svnrepos/rename_Test/alpha?.txt/format':"

> WinXP doesn't like having '?' in the filenames, but it seems strange
> that SVN is including the filename part of the URL when trying to
> access
> the internal repository structure.

It does seem strange, but since you're on Windows, you shouldn't be
using filenames that are incompatible with Windows. You should
install a pre-commit hook preventing such commits. I don't know of
such a script, but given the number of Windows users out there, I'd
think this is a common problem, and if you write one (Python seems to
be the language of choice for hook scripts at the moment), you should
contribute it so it can live with the other contributed hook scripts:

http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/

---------------------------------------------------------------------
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-01 07:53:22 CEST

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.