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

Re: [RFC] Paths API (svn_dirent_uri.h) - improvements

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Thu, 12 Nov 2009 14:57:25 +0000

On Wed, 2009-11-11 at 15:36 -0500, Greg Stein wrote:
> On Wed, Nov 11, 2009 at 07:25, Julian Foad <julian.foad_at_wandisco.com> wrote:
> >...
> > RELPATH:
> >
> > A "relpath" represents "an unrooted path that can be joined to any other
> > relative path, uri or dirent". Good, but let's specify it more
> > precisely. The terms "absolute" and "relative" are not clearly defined
> > when applied to partially-relative paths such as a Windows
> > "\rel-to-current-drive" or a URL "/rel-to-server".
>
> No. The intent is to NOT have any leading slashes. A relpath should be
> "path/to/some/place".

Totally agree. That was and is my intent.

> Change the docstring accordingly.
>
> The intent is that a relpath is always attached to some root. For
> Windows that could be "\". For a URL, that could be
> "http://hostname/". Whatever. But never ever a leading slash.

I hope we're in agreement that a relpath can not only be relative to
that kind of minimal "root", but can also be relative to a repository
root such as "http://hostname/dir1/dir2/" or to a WC absdir such as
"/home/julian/wc" or to another relpath such as "subversion/libsvn_wc",
in fact relative to any URI or dirent or relpath.

> Bert has been making a bunch of changes throughout the codebase in
> order to make the URI APIs take *only* absolute URIs. Never a relative
> URI.

Sure - see below.

> > URLS:
> >
> > * Define and name functions for URLs instead of URIs.
>
> Nope.
>
> I spoke at length, last week, with Roy Fielding [...]

OK, those arguments are good enough for me.

> > * The representation of a URL should be always URI-encoded.
>
> Yah. That's how we treat them, in general, but having it declared that
> way would be good.

Great.

> As I noted above, we also want them to *always* be
> absolute. The codebase is pretty darned close to allowing for that.
> Also note that the svn_uri_* functions are new in 1.7, so we can
> define them with this restriction.

You explained in follow-up emails that it's useful to be sure that we're
always using abs URIs in these APIs. That's an OK position to take, and
I'm not against it, but if we do that then I'm sure we will also need a
few API functions to handle relative URIs. That's fine, and may be the
best way to go. The relative-URI API need only consist of a very few
functions, and could be aimed only at converting relative URIs to
absolute URIs (and maybe vice versa), or maybe only at converting
relpaths to and from relative URIs, whereas the abs-URI API consists of
very many functions.

> Outside of the above... *shrug*. Seems fine.

Thanks.
- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2417079
Received on 2009-11-12 15:57:46 CET

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.