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

Re: [PATCH] Drastically reduce the number of opened ra_sessions during merge.

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sun, 5 Oct 2008 22:09:10 +0300 (Jerusalem Daylight Time)

Lieven Govaerts wrote on Sun, 5 Oct 2008 at 14:51 +0200:
> +/** Ensure the caller receives a RA_SESSION object to URL. This function will
> + * reuse RA_SESSION if it is not NULL and is opened to the same repository as
> + * URL is pointing to. Otherwise a new session object will be created.
> + */
> +static svn_error_t *
> +ensure_ra_session_url(svn_ra_session_t **ra_session,
> + const char *url,
> + svn_client_ctx_t *ctx,
> + apr_pool_t *pool)
> +{
> + svn_error_t *err = SVN_NO_ERROR;
>
> + if (*ra_session)
> + {
> + const char *old_session_url;
> + err = svn_client__ensure_ra_session_url(&old_session_url,
> + *ra_session,
> + url,
> + pool);
> + }
> +
> + if ((err && err->apr_err == SVN_ERR_RA_ILLEGAL_URL) || ! *ra_session)
> + {
> + err = svn_client__open_ra_session_internal(ra_session, url,
> + NULL, NULL, NULL,
> + FALSE, TRUE, ctx, pool);
> + }
> + SVN_ERR(err);
> +
> + return SVN_NO_ERROR;
> +}

I think the ILLEGAL_URL error should be cleared.

Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-10-05 21:09:33 CEST

This is an archived mail posted to the Subversion Dev mailing list.