You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kalle Olavi Niemitalo <ko...@iki.fi> on 2003/08/05 16:34:48 UTC

Re: PROPOSAL: URL-syntax

SLOGEN <je...@slog.dk> writes:

> Add any revision-encoding to the repository path, example:
>
>    http://svn.foo/repository;1234/dir/file

I have a Subversion repository directly at the root
of an Apache virtual host.  Would I then use
<http://subversion.kon.iki.fi;109/nimiavaruus>
to refer to a file in revision 109 of the tree?
That syntax looks like it could well conflict with
future URI extensions for HTTP-over-tcpmux or such.

(The server is not in public DNS; don't bother trying.)

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

Re: PROPOSAL: URL-syntax

Posted by john <ma...@freelock.com>.
Jack Repenning wrote:

> At 8:06 AM +0300 8/6/03, Kalle Olavi Niemitalo wrote:
>
>> Erik Hülsmann <e....@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

Re: PROPOSAL: URL-syntax

Posted by Jack Repenning <jr...@collab.net>.
At 8:06 AM +0300 8/6/03, Kalle Olavi Niemitalo wrote:
>Erik Hülsmann <e....@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

Or is it the idea that the URL would pass to the 
server side just as shown at top?

If the URL is parsed, then it doesn't help 
generic clients (e.g., web browsers).

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.

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.

I think.  Don't we?
-- 
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090

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


Re: PROPOSAL: URL-syntax

Posted by Kalle Olavi Niemitalo <ko...@iki.fi>.
Erik Hülsmann <e....@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".

Inserting a path segment at the beginning like that seems a bit
weird though, but I suppose it won't actually cause any more
problems than altering the first segment would.

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


Re: PROPOSAL: URL-syntax

Posted by Jerry Haltom <wa...@larvalstage.net>.
Could just use the ?rev=id that all other sorts of stuff uses. It's not
particularly intuitive, but is it suppose to be?

On Tue, 2003-08-05 at 13:43, Erik Hülsmann wrote:
> Hi Kalle,
> 
> >SLOGEN <je...@slog.dk> writes:
> >
> >> Add any revision-encoding to the repository path, example:
> >>
> >>    http://svn.foo/repository;1234/dir/file
> >
> >I have a Subversion repository directly at the root
> >of an Apache virtual host.  Would I then use
> ><http://subversion.kon.iki.fi;109/nimiavaruus>
> >to refer to a file in revision 109 of the tree?
> >That syntax looks like it could well conflict with
> >future URI extensions for HTTP-over-tcpmux or such.
> 
> The root of the http filespace is actually at 
> 
>    http://subversion.kon.iki.fi/
> 
> so the reference to your repository would become:
> 
>    http://subversion.kon.iki.fi/;109/nimiavaruus
> 
> Would that not be acceptable?
> 
> bye,
> 
> Erik.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
-- 
Jerry Haltom
Feedback Plus, Inc.


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

Re: PROPOSAL: URL-syntax

Posted by Erik Hülsmann <e....@gmx.net>.
Hi Kalle,

>SLOGEN <je...@slog.dk> writes:
>
>> Add any revision-encoding to the repository path, example:
>>
>>    http://svn.foo/repository;1234/dir/file
>
>I have a Subversion repository directly at the root
>of an Apache virtual host.  Would I then use
><http://subversion.kon.iki.fi;109/nimiavaruus>
>to refer to a file in revision 109 of the tree?
>That syntax looks like it could well conflict with
>future URI extensions for HTTP-over-tcpmux or such.

The root of the http filespace is actually at 

   http://subversion.kon.iki.fi/

so the reference to your repository would become:

   http://subversion.kon.iki.fi/;109/nimiavaruus

Would that not be acceptable?

bye,

Erik.

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