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

Re: [Subclipse-users] SVNClientAdapter and URLs paths that contain square brackets ([ and ])

From: Mark Phippard <markphip_at_gmail.com>
Date: Mon, 2 Jul 2012 08:18:00 -0400

The old code did not URI encode characters before passing them to the API so it was not correct.

Sent from my iPad

On Jul 2, 2012, at 5:46 AM, David Balažic <david.balazic_at_comtrade.com> wrote:

> Note that square brackets are reserved characters in URLs (URIs) and _should_ be (percent) encoded.
> So the (old) code is actually working as per specs.
>
> See http://en.wikipedia.org/wiki/Percent-encoding
>
>
> Regards,
> David Balažic
> Software Engineer
> www.comtrade.com
>
>> -----Original Message-----
>> From: Mark Phippard [mailto:markphip_at_gmail.com]
>> Sent: Friday, June 29, 2012 5:41 PM
>> To: users_at_subclipse.tigris.org
>> Subject: Re: [Subclipse-users] SVNClientAdapter and URLs
>> paths that contain square brackets ([ and ])
>> Importance: Low
>>
>> This is fixed in the trunk version of SVNClientAdapter that is part of
>> Subclipse 1.8.x.
>>
>> http://subclipse.tigris.org/issues/show_bug.cgi?id=1298
>>
>> http://subclipse.tigris.org/source/browse/subclipse/trunk/svnC
>> lientAdapter/src/main/org/tigris/subversion/svnclientadapter/S
>> VNUrl.java?r1=5130&r2=3553
>>
>>
>>
>>
>> On Thu, Jun 28, 2012 at 4:22 PM, Al Habte
>> <aghabte_at_rockwellcollins.com> wrote:
>>> SVNClientAdapter Version: 1.6.12 (bundle version)
>>> Client OS: Windows-7
>>>
>>> Attempting to get the SVN log information, of a URL path
>> that contains square brackets ([ and ]) fails with "malformed
>> or the scheme or host or path is missing". Here is the piece
>> of code that shows
>>>
>>> SVNUrl currentURL = new
>> SVNUrl("http://bpsvn/sandbox/trunk/foo[bar].txt");
>>> final ISVNClientAdapter svnClient =
>> getSVNClient(currentURL, SVNRevision.HEAD);
>>> svnClient.getLogMessages(currentURL, SVNRevision.HEAD,
>> SVNRevision.HEAD, new SVNRevision.Number(0), false, true, 0);
>>>
>>> The above code raises an exception with the following error message:
>>>
>>> org.tigris.subversion.svnclientadapter.SVNClientException:
>> org.tigris.subversion.javahl.ClientException: Bad URL passed
>> to RA layer
>>> svn: URL 'http://bpsvn/sandbox/trunk/foo[bar].txt' is
>> malformed or the scheme or host or path is missing
>>>
>>>
>>> Similarly, the getInfo() method below also fails and raises
>> an exception, with a different error message, for the same URL:
>>>
>>> ISVNClientAdapter svnClient = getSVNClient(new
>> SVNUrl("http://bpsvn/sandbox/trunk/foo[bar].txt"),
>>> SVNRevision.HEAD);
>>> svnClient.getInfo(new
>> SVNUrl("http://bpsvn/sandbox/trunk/foo[bar].txt"));
>>>
>>> This getInfo() method generates the following exception
>> error message :
>>>
>>> org.tigris.subversion.svnclientadapter.SVNClientException:
>> org.tigris.subversion.javahl.ClientException: Bogus URL
>>> svn: URL 'http://bpsvn/sandbox/trunk/foo[bar].txt' is not
>> properly URI-encoded
>>>
>>> However, both of these methods, getInfo() and
>> getLogMessages(), handle the following URLs successfully:
>>>
>>> http://bpsvn/sandbox/trunk/foo(bar).txt
>>> http://bpsvn/sandbox/trunk/foo{bar}.txt
>>>
>>> There seems to be a limitation in what special characters
>> SVNClientAdapter can handle in a path. Is this a correct
>> assessment? Is there a description on what special characters
>> one can use or should avoid in a path?
>>>
>>> Thanks,
>>> Al Habte
>>>
>>> ------------------------------------------------------
>>>
>> http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&d
>> sMessageId=2973803
>>>
>>> To unsubscribe from this discussion, e-mail:
>> [users-unsubscribe_at_subclipse.tigris.org].
>>
>>
>>
>> --
>> Thanks
>>
>> Mark Phippard
>> http://markphip.blogspot.com/
>>
>> ------------------------------------------------------
>> http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&d
>> sMessageId=2973971
>>
>> To unsubscribe from this discussion, e-mail:
>> [users-unsubscribe_at_subclipse.tigris.org].
>>
>
> ------------------------------------------------------
> http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=2974359
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subclipse.tigris.org].

------------------------------------------------------
http://subclipse.tigris.org/ds/viewMessage.do?dsForumId=1047&dsMessageId=2974383

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subclipse.tigris.org].
Received on 2012-07-02 14:17:42 CEST

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.