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

Re: Patch: add svn_client_get_repos_path

From: Barry Scott <barry_at_barrys-emacs.org>
Date: 2005-03-31 00:39:12 CEST

If I create a diff against the head of the trunk having added this code
and the matching edit to the header file is that all thats needed to get
you to take the patch?

Barry

On Mar 19, 2005, at 23:27, Barry Scott wrote:

> Here is code that could be added to subversion/libsvn_client/ra.c to
> add
> a new svn_client_get_repos_path function. Its based on the code of
> svn_client_uuid_from_url that is the same pattern.
>
> How can the code check the url so that that I can prevent this
> assert?
>
> Assertion failed: is_canonical (path, len), file
> ...\subversion\libsvn_subr\path.c, line 377
>
> svn_error_t *
> svn_client_get_repos_root (const char **repos_root,
> const char *url,
> svn_client_ctx_t *ctx,
> apr_pool_t *pool)
> {
> svn_ra_session_t *ra_session;
> apr_pool_t *subpool = svn_pool_create (pool);
>
> /* use subpool to create a temporary RA session */
> SVN_ERR (svn_client__open_ra_session (&ra_session, url,
> NULL, /* no base dir */
> NULL, NULL, FALSE, TRUE,
> ctx, subpool));
>
> SVN_ERR (svn_ra_get_repos_root (ra_session, repos_root, subpool));
>
> /* Copy the repos_root in to the passed-in pool. */
> *repos_root = apr_pstrdup (pool, *repos_root);
>
> /* destroy the RA session */
> svn_pool_destroy (subpool);
>
> return SVN_NO_ERROR;
> }
>
> Barry
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 31 00:40:33 2005

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.