You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Daniel Becroft <Da...@supercorp.com.au> on 2008/10/01 03:02:02 UTC

Special Character Inconsistencies

Hi all,
 
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
 
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 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.
 
Cheers,
Daniel B.
 
 
 
 
 

RE: Special Character Inconsistencies

Posted by Daniel Becroft <Da...@supercorp.com.au>.
 

> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2008c@ryandesign.com] 
> Sent: Wednesday, October 01, 2008 3:55 PM
> To: Daniel Becroft
> Cc: SubVersion Users
> Subject: Re: Special Character Inconsistencies
> 
> Sorry, I forgot to mention:
> 
> On Oct 1, 2008, at 12:53 AM, Ryan Schmidt wrote:
> 
> > 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:
> >>>
> >>>>> svn list svn://localhost/rename_test
> >>>>     alpha?.txt
> >>>>
> >>>> It appears the rename has worked.
> 
> Here you use "rename_test".
> 
> >>>> 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.
> 
> Here you use "rename_Test".
> 
> URLs are supposed to be case-sensitive, so you should use the 
> correct case.

Yeah, sorry. I noticed that (for the svn:// protocol on Windows,
anyway), the repository name can be any case, but the path within the
repository needs to be case senstiive.

Ie

svn://localhost/RENAME_TEST/trunk
svn://localhost/Rename_Test/trunk
svn://localhost/rename_test/trunk

all work, but:

Svn://localhost/rename_test/TRUNK

will not.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Special Character Inconsistencies

Posted by Ryan Schmidt <su...@ryandesign.com>.
Sorry, I forgot to mention:

On Oct 1, 2008, at 12:53 AM, Ryan Schmidt wrote:

> 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:
>>>
>>>>> svn list svn://localhost/rename_test
>>>>     alpha?.txt
>>>>
>>>> It appears the rename has worked.

Here you use "rename_test".

>>>> 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.

Here you use "rename_Test".

URLs are supposed to be case-sensitive, so you should use the correct  
case.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Special Character Inconsistencies

Posted by Daniel Becroft <Da...@supercorp.com.au>.
 > -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2008c@ryandesign.com] 
> Sent: Wednesday, October 01, 2008 3:53 PM
> To: Daniel Becroft
> Cc: SubVersion Users
> Subject: Re: Special Character Inconsistencies
> 
> 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:

I totally agree. I haven't hit this problem in the wild, yet, I just
came across it whilst trying to replicate the issue on the dev@ list
with the SVN repository (the ?WHAT?.txt file problem). 

I think the problem arises because the server (not the client) is on
windows. So even if a *NIX client did the URL-only delete statement, the
same error would appear. 

As I said, not something that we have seen actually happen, it was
purely a test case, and thought I would raise it.

Cheers,
Daniel B.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Special Character Inconsistencies

Posted by Ryan Schmidt <su...@ryandesign.com>.
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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Special Character Inconsistencies

Posted by Daniel Becroft <Da...@supercorp.com.au>.
 

> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2008c@ryandesign.com] 
> Sent: Wednesday, October 01, 2008 3:37 PM
> To: Daniel Becroft
> Cc: SubVersion Users
> Subject: Re: Special Character Inconsistencies
> 
> 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.
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.

Cheers,
Daniel B.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Special Character Inconsistencies

Posted by Ryan Schmidt <su...@ryandesign.com>.
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


> 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 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?



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org