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

Re: Official revision syntax for Subversion URLs

From: John Locke <mail_at_freelock.com>
Date: 2003-08-06 00:00:29 CEST

I'm thinking along David's lines here--redirecting to a URL that
includes the repository revision:

On Tue, 2003-08-05 at 14:35, David Waite wrote:
> I would like to toss in another potential solution :-)
>
> a. We allow users to access the repository with a query segment
> (/repos/file?svn.revision=1234 or whatever)
> b. The repository redirects them to a path of a form like /repos/@1234/file
> c. The user agent shows that particular content.
>
> The user does not need to know the repository structure in order to get
> a particular revision, and the repository does not need to rewrite
> content in order for relative links to work. The repository can also
> keep whatever its existing syntax for revisions, although it might be
> desirable to change it to something which is documented and
> user-understood (like the @rev syntax above). This still requires a
> network round-trip - although, I think it could be a configuration
> option to just serve the file at the original query'd URL for GET requests.
>
I think this is a very neat solution (redirecting to the correct
version), and what is particularly nice about it is that (a) can be done
(I think) without any changes to Subversion whatsoever, using an Apache
mod_rewrite rule. Of course, the Apache administrator would have to know
the real location of the repository... and would need to get added to
Subversion for svn:// support...

I vote for the semicolon added to the repository URL:

http://base.url/whatever/path/to/repos;234/path/to/file.ext

What I'll add to this discussion, perhaps may not be desireable, but
it's an idea, anyway:

Make the version fragment (after the semicolon) optional on the request,
but ALWAYS return at least the semicolon in the response. For the HEAD
revision, you can ask for:

http://base.url/whatever/path/to/repos/path/to/file.ext

And you get:

http://base.url/whatever/path/to/repos;/path/to/file.ext

with a semicolon added to whichever part of the path identifies the
repository. If the repository is at the base of a virtual path, you
might get:

http://base.url/;/path/to/file.ext

back... and of course you can specify any repository version by simply
adding it after the semicolon.

Seems to me a solution along these lines addresses all the concerns in
this message head: you can browse in "way-back" mode, it's backwards
compatible, for scripting you can ask for a file appending the query
"?rev=234" (or equivalent) and parse the returned header to find the
semicolon without an extra trip to the server.

-- 
John Locke
http://freelock.com
Recently published: "Complete the e-mail set up: User accounts, DNS, and more"
http://www.techrepublic.com/article_guest.jhtml?id=r00620030617jxl01.htm
Play sports? Check in at http://teamcheckin.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 6 00:01:50 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.