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

RE: URI escaping in repository URLs

From: Stephen Warren <swarren_at_paramanet.com>
Date: 2004-03-31 03:12:00 CEST

> From: C. Michael Pilato [mailto:cmpilato@collab.net]
>
> "Stephen Warren" <swarren@paramanet.com> writes:
> > I attempted to do the following:
> >
> > svn import . "http://localhost/repos/document/System Hardware" -m xxxx
> >
> > which complained about the URI not being URI-encoded.
> > The following fixed it:
> >
> > svn import .
> > "http://localhost/repos/document/System%20Hardware" -m xxxx
> >
> > My question is: Why doesn't the svn client do this for me?
>
> Because we don't want to be in the business of deciding whether or not
> "url://host/repos/My%25Path" means "url://host/repos/My%25Path" or
> "url://host/repos/My%2525Path". In other words, you cannot look at a
> URI-ish thing and say with certainty that it has been URI-encoded
> (though you can definitely say it hasn't). So the right way to deal
> with the situation is to say, "Alrighty then, the user must provide to
> use a properly encoded URL so there are no misunderstandings."

OK. That example makes sense.

However, can't you allow the user to specify whether the URI is encoded or not - and if the user marks it as not encoded, then apply encoding where required to make it a valid URI?

If this was implemented, and the default was to assume non-encoded URIs (which I would *imagine* people would be more likely to type...) then my initial request would have worked, but for more advanced situations (knowledgable user, GUI wrapping svn command-line utility that already encodes the URIs), a flag could be passed in to say "this is already URI encoded - just validate it, don't encode it)

I personally believe this would make the system easier to use in the more common situations, whilst still allowing the existing flexibility.

--
Stephen Warren, Software Engineer, Parama Networks, San Jose, CA
http://www.wwwdotorg.org/work_contact/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Mar 31 03:12:29 2004

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