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

Re: Summary: URL rev proposals

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-08-13 23:56:52 CEST

On Wed, Aug 13, 2003 at 11:34:46PM +0200, SLOGEN wrote:
> Greg Stein wrote:
> >On Wed, Aug 13, 2003 at 10:30:06AM -0700, Jack Repenning wrote:
>...
> But the server can certainly transform the "specify rev at end of URL"
> model to a "specify rev at repository level", and could send a nice
> "Permanently moved" HTTP redirect to that place.

Once you bring the server into it, and if you assume the client will follow
the redirects, then yes: you could have all kinds of fun URL formats.

The original question was about a URL that would "just work", which I don't
think is doable. But the redirect idea... that definitely has merit. Good
one; I hadn't thought of it.

>...
> >>Greg: is it fair to summarize this post as "there really is no
> >>reasonable solution to this"?
> >>(Not that I agree, actually, but is that what you're saying? ;-)
> >Well, dang it... if you want to pin me down... yah :-)

Given the earlier constraint, yes. But with the redirect? Doable.

> I still think the proper solution is the one I suggested, with the
> multiple revsion specifiers in the URL, but for simplicity reasons I
> would recommend implementing the one with ..../repos;rev=STUFF/..., and
> a http redirect for ....?rev=STUFF.

No need to invent a new format. Just redirect to the baseline collection.

    http://svn.example.com/repos/path/to/file?rev=123

redirects to:

    http://svn.example.com/repos/!svn/bc/123/path/to/file

If the file doesn't exist in that rev, we could return a 404 rather than a
redirect, if wanted to optimize round trips. Otherwise, we could blindly do
the redirect and wait for the BC to return the 404.

> Note, that this simple approximation is a special case of my previous
> suggestion, so if need arises the notation's implementation can be
> generalized.

No need for any new formats. We already have a URL format with the revision
number "in the middle". The problem was that the client could not
*manufacture* the URL on its own. But with the server involved, everything
is hunky dory.

Now... if somebody would like to file a post-1.0 enhancement to implement
the syntax and the redirection... please feel free :-)

(and within some level of bikeshedding, yes: the proposal works for me)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 13 23:48:57 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.