Daniel Rall writes:
> > > + *
> > > + * @since New in 1.5.
> > > + */
> > > +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?
> > > + SVN_ERR(svn_client__get_revision_number(&rev, ra_session, revision,
> > > + "", pool));
> > > +
> > > + if (svn_path_is_url(path_or_url))
> > > + {
> > > + char *repos_rel_path;
> > > + SVN_ERR(svn_client__path_relative_to_root(&repos_rel_path, url, NULL,
> > > + ra_session, NULL, pool));
> > > + SVN_ERR(svn_client__get_repos_merge_info(ra_session, mergeinfo,
> > > + repos_rel_path, rev, pool));
> > > + }
> > > + else
> > > + {
> > > + svn_boolean_t inherited;
> > > + SVN_ERR(get_wc_or_repos_merge_info(mergeinfo, &entry, &inherited,
> > > + ra_session, path_or_url, adm_access,
> > > + ctx, pool));
> >
> > 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.
Thanks,
//Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Apr 3 11:28:26 2007