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

Re: [PATCH] Get-locations - Finished (more or less)

From: Shlomi Fish <shlomif_at_iglu.org.il>
Date: 2004-05-26 22:11:55 CEST

On Sunday 25 April 2004 23:18, Greg Hudson wrote:
> On Sun, 2004-04-25 at 03:52, Shlomi Fish wrote:
> > Hmmm... is there any reason the style of the ra_svn and svnserve
> > components is different than the rest of Subversion. This is highly
> > confusing and I did not know what to do in this case. Future contributors
> > may face the same problem.
> I would support having a consistent style across the whole project, but
> consensus seems to be against that so far. Certainly, the right answer
> is not to have mixed styles within a single file.

OK, even though I also encountered places where one file had inconsistent

> > > This client code does not seem appropriate. An ra_lib function is not
> > > supposed to take a URL argument to operate on; it is supposed to take a
> > > path argument relative to the root of the RA session.
> >
> > You mean the root returned by the get_repos_root() callback?
> No, relative to the URL used to open the RA session.

Well, in that case we may face a problem. Some of the paths returned can be
well outside that URL ("../../../" etc) and some of them can even be out of
the bounds of the working copy. (if it was checked out from a directory of
the repository).

Determining if the paths belong in the same repository would be somewhat
harder in this case, as would translating them to this format from the
absolute paths within the repository.

> > Well, when cmpilato and I formulated the specification for the
> > get_locations() handler, we specifically said we are going to input and
> > output URLs.
> Were you guys specifically talking about the RA interface, or were you
> talking about some other interface?

Well, the specific E-mail is this:


cmpilato there says that "The return hash maps those same location revisions
to the location paths.". I don't exactly know what he meant by "paths". I may
have actually misinterpreted him.

In any case, the ra_dav protocol does path URLs, and so should probably the
ra_svn one.

> It seems highly inconsistent for every single ra-lib function (including
> similar ones like check_path) to take a path parameter, while this one
> new function takes a URL parameter. If you guys have designed this
> inconsistency into the RA interface, then I think you guys have designed
> it wrong, although I'm willing to listen to arguments to the contrary.


> > > This is not correct C code; the representation of a void * could,
> > > conceivably, be different from the representation of an svn_revnum_t *.
> >
> > Interesting. I never encountered such a situation. Oh well. If you say
> > so.
> It's not common. But it's a point of C correctness which we follow in
> our code. (There are other points of C correctness we don't follow; for
> instance, we use apr_pcalloc and expect it to initialize pointer
> parameters to NULL, which is not valid C. I argued against this years
> ago and lost.)

I recall the C FAQ saying that on some obscure platforms, the NULL pointer is
not all zero bits.



        Shlomi Fish

Shlomi Fish shlomif@iglu.org.il
Homepage: http://shlomif.il.eu.org/

Quidquid latine dictum sit, altum viditur.
        [Whatever is said in Latin sounds profound.]

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 26 22:07:16 2004

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.