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

Re: svn commit: r24288 - in trunk/subversion: include libsvn_client

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-04-06 00:38:28 CEST

On Tue, 03 Apr 2007, Peter Lundblad wrote:

> Daniel Rall writes:
...
> > > > +svn_error_t *
> > > > +svn_client_get_mergeinfo(apr_hash_t **mergeinfo,
> > > > + const char *path_or_url,
> > > > + svn_opt_revision_t *revision,
> > > > + svn_client_ctx_t *ctx,
> > > > + apr_pool_t *pool);
> > >
> > > Is there a reason this doesn't take a peg revision?
> >
> > REVISION seems implicitly peg to me. I'm fine with adding an explicit
> > PEG_REVISION, if people think it's necessary. I couldn't think of a
> > meaningful use case where the operative revision would differ from the
> > peg revision, but adding a peg revision would be more consistent with
> > our other APIs.
>
> I don't know of specific use case. It is just that we've seen
> patches adding pegrev support for all(?) our APIs through the years,
> so maybe that should be the default for a new client API?

I went through the same thought process while adding the API.
However, I still haven't thought of any use for a peg_revision on this
API.

...
> > > Hmmm, so if a WC path is specified, the revision is ignored... That's a bit
> > > unintuitive to me and not documented.
> >
> > I've documented the behavior. I agree that it's a bit unintuitive,
> > but found the convenience of the API a compelling enough trade-off.
> > Do you have an alternate suggestion?
>
> The obvious answer is to behave like the other client APIs, but I
> don't have a specific use case in mind.
>
> Maybe just say that @a revisions should be NULL
> for now so it is easy to extend if need be.

The doc string now reads:

 * Retrieve the merge info for @a path_or_url in @a *mergeinfo,
 * storing a mapping of repository-relative paths to @c
 * apr_array_header_t *'s of @c svn_merge_range_t *'s, or @c NULL if
 * there is no merge info.
 *
 * @a path_or_url is a WC path or repository URL. If @a path_or_url
 * is a WC path, @a revision is ignored in preference to @a
 * path_or_url's @c WORKING revision. If @a path_or_url is a URL, @a
 * revision is the revision at which to get its merge info. @a
 * mergeinfo is allocated in @a pool.

Is "ignored" sufficient, or should I explicitly say "NULL"?

  • application/pgp-signature attachment: stored
Received on Fri Apr 6 00:38:53 2007

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.