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

Re: svn commit: r1310085 - in /subversion/branches/ev2-export/subversion: include/svn_ra.h libsvn_client/add.c libsvn_ra/ra_loader.c

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 5 Apr 2012 22:40:50 -0400

On Apr 5, 2012 5:46 PM, <hwright_at_apache.org> wrote:
>
> Author: hwright
> Date: Thu Apr 5 21:45:42 2012
> New Revision: 1310085
>
> URL: http://svn.apache.org/viewvc?rev=1310085&view=rev
> Log:
> On the ev2-export branch:
> (this branch is going way beyond export, perhaps it should be renamed)
>
> Add svn_ra_get_commit_editor4(), which returns an Ev2 commit editor. We
> don't currently marshall Ev2 actions across the wire, this just wraps the
> Ev1 editor within the RA layer.
>
> * subversion/include/svn_ra.h
> (svn_ra_get_commit_editor4): New.
> (svn_ra_get_commit_editor3): Deprecate.
>
> * subversion/libsvn_client/add.c
> (drive_editor): Take an Ev2 editor, and drive it directly, rather than
> wrapping an Ev1 editor.
> (mkdir_urls): Request an Ev2 editor from the RA layer.
>
> * subversion/libsvn_ra/ra_loader.c
> (svn_ra_get_commit_editor4): New.
>
> Modified:
> subversion/branches/ev2-export/subversion/include/svn_ra.h
> subversion/branches/ev2-export/subversion/libsvn_client/add.c
> subversion/branches/ev2-export/subversion/libsvn_ra/ra_loader.c
>
> Modified: subversion/branches/ev2-export/subversion/include/svn_ra.h
> URL:
http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/include/svn_ra.h?rev=1310085&r1=1310084&r2=1310085&view=diff
>
==============================================================================
> --- subversion/branches/ev2-export/subversion/include/svn_ra.h (original)
> +++ subversion/branches/ev2-export/subversion/include/svn_ra.h Thu Apr 5
21:45:42 2012
> @@ -865,8 +865,28 @@ svn_ra_rev_prop(svn_ra_session_t *sessio
> *
> * Use @a pool for memory allocation.
> *
> + * @since New in 1.8.
> + */
> +svn_error_t *
> +svn_ra_get_commit_editor4(svn_ra_session_t *session,
> + svn_editor_t **editor,
> + apr_hash_t *revprop_table,
> + svn_commit_callback2_t callback,
> + void *callback_baton,
> + apr_hash_t *lock_tokens,
> + svn_boolean_t keep_locks,
> + svn_cancel_func_t cancel_func,
> + void *cancel_baton,
> + apr_pool_t *scratch_pool,
> + apr_pool_t *result_pool);

Pool order

>...
> +svn_error_t *
> +svn_ra_get_commit_editor4(svn_ra_session_t *session,
> + svn_editor_t **editor,
> + apr_hash_t *revprop_table,
> + svn_commit_callback2_t callback,
> + void *callback_baton,
> + apr_hash_t *lock_tokens,
> + svn_boolean_t keep_locks,
> + svn_cancel_func_t cancel_func,
> + void *cancel_baton,
> + apr_pool_t *scratch_pool,
> + apr_pool_t *result_pool)

Same

> +{
> + const svn_delta_editor_t *deditor;
> + void *dedit_baton;
> + /* Allocate this in a pool, since the callback will be called long
after
> + this function as returned. */
> + struct ccw_baton *ccwb = apr_palloc(result_pool, sizeof(*ccwb));
> + struct svn_delta__extra_baton *exb;
> + svn_delta_unlock_func_t unlock_func;
> + void *unlock_baton;
> + svn_boolean_t send_abs_paths;
> +
> + ccwb->original_callback = callback;
> + ccwb->original_baton = callback_baton;
> + ccwb->session = session;
> +
> + SVN_ERR(session->vtable->get_commit_editor(session, &deditor,
&dedit_baton,
> + revprop_table,
> + callback
> + ?
commit_callback_wrapper
> + : NULL,
> + callback ? ccwb : NULL,
> + lock_tokens, keep_locks,
> + result_pool));
> +
> + /* Create the Ev2 editor from the Ev1 editor provided by the RA layer.
*/
> + SVN_ERR(svn_delta__editor_from_delta(editor, &exb,
> + &unlock_func, &unlock_baton,
> + deditor, dedit_baton,
&send_abs_paths,

Isn't SEND_ABS_PATHS a delayed-use param? Does that have to go on the heap?

>...

Cheers,
-g
Received on 2012-04-06 04:42:26 CEST

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.