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

Patch: add svn_client_get_repos_path

From: Barry Scott <barry_at_barrys-emacs.org>
Date: 2005-03-20 00:27:02 CET

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

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;


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Mar 20 00:28:15 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.