Login | Register
My pages Projects Community openCollabNet

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

subclipse
Discussion topic

There will be a brief maintenance window every Friday at 17:00 Pacific.
For further details, see CollabNet's maintenance and upgrade policy.

Back to topic list

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

Author David Balažic <david dot balazic at comtrade dot com>
Full name David Balažic <david dot balazic at comtrade dot com>
Date 2012-07-02 02:46:40 PDT
Message 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-enc​oding


Regards,
David Balažic
Software Engineer
www.comtrade.com

> -----Original Message-----
> From: Mark Phippard [mailto:markphip at gmail dot com]
> Sent: Friday, June 29, 2012 5:41 PM
> To: users at subclipse dot tigris dot 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.tig​ris.org/issues/show_​bug.cgi?id=1298
>
> http://subclipse.tig​ris.org/source/brows​e/subclipse/trunk/sv​nC
> lientAdapter/src/mai​n/org/tigris/subvers​ion/svnclientadapter​/S
> VNUrl.java?r1=5130&r2=3553
>
>
>
>
> On Thu, Jun 28, 2012 at 4:22 PM, Al Habte
> <aghabte@rockwell​collins.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.getLogMess​ages(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.subversio​n.svnclientadapter.S​VNClientException:
> org.tigris.subversio​n.javahl.ClientExcep​tion: 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.subversio​n.svnclientadapter.S​VNClientException:
> org.tigris.subversio​n.javahl.ClientExcep​tion: 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.tig​ris.org/ds/viewMessa​ge.do?dsForumId=1047​&d
> sMessageId=2973803
> >
> > To unsubscribe from this discussion, e-mail:
> [users-unsubscribe@s​ubclipse.tigris.org]​.
>
>
>
> --
> Thanks
>
> Mark Phippard
> http://markphip.blogspot.com/
>
> --------------------​--------------------​--------------
> http://subclipse.tig​ris.org/ds/viewMessa​ge.do?dsForumId=1047​&d
> sMessageId=2973971
>
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe@s​ubclipse.tigris.org]​.
>

« Previous message in topic | 3 of 4 | Next message in topic »

Messages

Show all messages in topic

[Subclipse-users] SVNClientAdapter and URLs paths that contain square brackets ([ and ]) aghabte Al Habte 2012-06-28 13:22:43 PDT
     Re: [Subclipse-users] SVNClientAdapter and URLs paths that contain square brackets ([ and ]) markphip Mark Phippard 2012-06-29 08:41:04 PDT
         RE: [Subclipse-users] SVNClientAdapter and URLs paths that contain square brackets ([ and ]) David Balažic <david dot balazic at comtrade dot com> David Balažic <david dot balazic at comtrade dot com> 2012-07-02 02:46:40 PDT
             Re: [Subclipse-users] SVNClientAdapter and URLs paths that contain square brackets ([ and ]) markphip Mark Phippard 2012-07-02 05:17:38 PDT
Messages per page: