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

Re: [PATCH][MERGE-TRACKING] Step 2 of repos to repos copyfrom info recording

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-10-11 03:10:06 CEST

On Mon, 09 Oct 2006, Madan S. wrote:

> On Thu, 28 Sep 2006 22:33:30 +0530, Daniel Rall <dlr@collab.net> wrote:
>
> >>>>+ /* Find src path relative to the repos root */
> >>>
> >>>Do we have code to do this anywhere else?
> >>
> >>I dont think so. I checked again, and was not able to find equivalent
> >>code
> >>anywhere else.
> >>But, you are right... this is kinda generic. Should we make it an
> >>svn_path.h API?
> >Possibly! Propose an API signature and doc string.
>
> Restating the problem:
>
> We need a function, such that:
> input: svn_ra_session_t object, and a URL path for the corresponding
> repository.
> output: the location of the path, relative to the repository root.
> assumption: The url and the svn_ra_session_t object belong to the same
> repository.
>
> This function would be needed for merge-tracking purposes, where the path
> to be stored in the svn:mergeinfo property has to be relative to the repos
> root.

Yup! Something like a client-side version of svn_ra_get_locations()
which doesn't do history tracing or take peg revisions into
consideration. You might be able to crib some code from
svn_ra_local__split_URL().

> Am thinking of the following API. Suggestions, criticisms welcome.
>
> subversion/include/svn_path.h
> /** Return in @a rel_path, the location of @a url_path relative to the
> root of the repository given by @a ra_session.
> */
> svn_errot_t *
> svn_path_relative_to_repos_root(svn_string_t *rel_path, svn_ra_session_t
> *ra_session, const char *url_path, apr_pool_t *pool);

Would this be better as an svn_ra.h API?

/** Return in @a *rel_path, the location of @a url_path relative to
 * the root of the repository for @a ra_session.
 */
svn_error_t *
svn_ra_path_relative_to_repos_root(svn_ra_session_t *ra_session,
                                   svn_string_t **rel_path,
                                   const char *url_path,
                                   apr_pool_t *pool);

  • application/pgp-signature attachment: stored
Received on Wed Oct 11 03:08:39 2006

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.