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

Re: PROPOSAL: URL-syntax

From: john <mail_at_freelock.com>
Date: 2003-08-06 19:06:16 CEST

Jack Repenning wrote:

> At 8:06 AM +0300 8/6/03, Kalle Olavi Niemitalo wrote:
>
>> Erik Hülsmann <e.huelsmann@gmx.net> writes:
>>
>>> http://subversion.kon.iki.fi/;109/nimiavaruus
>>>
>>> Would that not be acceptable?
>>
>>
>> Well, yes it would, provided that I could use %3b109 to refer to
>> a directory named ";109".
>
>
> Is the idea that this URL would be parsed by the client, and turned
> into a "regular" URL plus some protocol indication of the revision of
> interest -- basically, rewritten by the client into
> -r 109 http://subversion.kon.iki.fi/nimiavaruus

Perhaps short term, but I don't think this is desireable, because it
leads to far too many inconsistent implementations. I think it ought to
be dumped to the server as is--URL encode filenames with special
characters, but otherwise let the server do the work.

> If the URL is passed, then we create complications at the URL rewrite
> level, don't we? I'm not very smart about httpd configurations, but it
> seems tricky to write a rewrite rule that will handle arbitrary,
> optional stuff at this point.

To create a rewrite rule, you would have to know where to grab and where
to insert. But this is basically dependent on where in the URL the
repository is, something the Administrator would need to know. A simple
FAQ entry on the web site could provide examples of rewrite rules.

But the only time Apache should need to rewrite URLs is if you've moved
a repository.

>
> If, on the other hand, we put the revision marker just inside the
> repository (regardless of how deep that is into the URL), then we
> guarantee it reaches actual Subversion code, which can handle it
> consistently for all clients.

Yeah, but how does the client know what part of the path is inside the
repository? If you put the revision marker before the repository in the
URL, it would never reach Subversion, but get tossed by Apache (unless
there was a rewrite rule in place--inelegant).

I think we should allow revision markers at two places: at the
repository level (always included in URLs returned by subversion), and
at the end of the URL in a query string (which gets rewritten by
Subversion to put the revision marker at the repository level in the
URL). That can't be very hard to implement. I think it's not good to
allow it anywhere else--if you move a repository, you know where it came
from and where it went, so you can easily create an Apache rewrite rule
for that case. I don't see any benefit to making URLs that forgiving as
a general rule--the only reason I can think of is if you want to
actually obscure the location of the repository (which would just slow
somebody down a couple steps). That seems antithetical to some of the
benefits already brought up in this thread.

+1 to the idea of having a slightly different meaning to the query
string ?rev=xxx, where this version returns whatever this file was named
at the revision specified, and rewriting the returned URL to the
standard format with the revision marker embedded to the repository part
of the path.

Cheers,
John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 6 19:07:05 2003

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

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