On 5 February 2015 at 03:44, <br...@apache.org> wrote: > Author: brane > Date: Thu Feb 5 00:44:57 2015 > New Revision: 1657451 > > URL: http://svn.apache.org/r1657451 > Log: > On the reuse-ra-session branch: Add explicit session reuse in libsvn_client. > Cool stuff! Two minor nits are below.
> > Modified: > subversion/branches/reuse-ra-session/subversion/libsvn_client/iprops.c > URL: > http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/iprops.c?rev=1657451&r1=1657450&r2=1657451&view=diff > ============================================================================== > --- subversion/branches/reuse-ra-session/subversion/libsvn_client/iprops.c > (original) > +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/iprops.c > Thu Feb 5 00:44:57 2015 > @@ -139,6 +139,7 @@ get_inheritable_props(apr_hash_t **wcroo > apr_hash_index_t *hi; > apr_pool_t *iterpool = svn_pool_create(scratch_pool); > apr_pool_t *session_pool = NULL; > + const svn_boolean_t new_ra_session = !ra_session; > *wcroot_iprops = apr_hash_make(result_pool); > > SVN_ERR_ASSERT(SVN_IS_VALID_REVNUM(revision)); > @@ -213,6 +214,8 @@ get_inheritable_props(apr_hash_t **wcroo > if (err->apr_err != SVN_ERR_FS_NOT_FOUND) > return svn_error_trace(err); > > + if (new_ra_session) > + SVN_ERR(svn_client__ra_session_release(ctx, ra_session)); > svn_error_clear(err); Currently svn_client__ra_session_release() never return error, but ERR will be lost if this changes someday in future. There are some inconstency between svn_client__ra_cache_release_session() which has void return type. > Modified: > subversion/branches/reuse-ra-session/subversion/libsvn_client/update.c > URL: > http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/libsvn_client/update.c?rev=1657451&r1=1657450&r2=1657451&view=diff > ============================================================================== > --- subversion/branches/reuse-ra-session/subversion/libsvn_client/update.c > (original) > +++ subversion/branches/reuse-ra-session/subversion/libsvn_client/update.c > Thu Feb 5 00:44:57 2015 > @@ -570,6 +570,7 @@ svn_client__update_internal(svn_revnum_t > svn_opt_revision_t peg_revision = *revision; > apr_hash_t *conflicted_paths > = ctx->conflict_func2 ? apr_hash_make(pool) : NULL; > + const svn_boolean_t new_ra_session = !ra_session; > > SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath)); > SVN_ERR_ASSERT(! (innerupdate && make_parents)); > @@ -661,6 +662,9 @@ svn_client__update_internal(svn_revnum_t > } > > cleanup: > + if (!err && new_ra_session && ra_session) > + SVN_ERR(svn_client__ra_session_release(ctx, ra_session)); > + The same is here: WC write-lock will not be released if svn_client__ra_session_release will return error. > err = svn_error_compose_create( > err, > svn_wc__release_write_lock(ctx->wc_ctx, lockroot_abspath, pool)); > -- Ivan Zhakov