Eric Gillespie <epg_at_pretzelnet.org> writes:
> [[[
> The cancellation editor has been discarding the wrapped editor's
> abort_edit callback, and all cancellation-wrapped editors have
> been using the default editor's no-op abort_edit.
>
> * subversion/libsvn_delta/cancel.c
> (abort_edit): Add new wrapper.
> (svn_delta_get_cancellation_editor): Set abort_edit.
> ]]]
My goodness. +1 to commit that. I'd suggest adding a note to the end
of svn_delta.h:svn_delta_editor_t, too, saying that if you add a new
callback there, you have to remember to implement it in the editor
returned by svn_delta_default_editor().
-K
> Index: subversion/libsvn_delta/cancel.c
> ===================================================================
> --- subversion/libsvn_delta/cancel.c (revision 30158)
> +++ subversion/libsvn_delta/cancel.c (working copy)
> @@ -336,6 +336,19 @@ close_edit(void *edit_baton,
> return SVN_NO_ERROR;
> }
>
> +static svn_error_t *
> +abort_edit(void *edit_baton,
> + apr_pool_t *pool)
> +{
> + struct edit_baton *eb = edit_baton;
> +
> + SVN_ERR(eb->cancel_func(eb->cancel_baton));
> +
> + SVN_ERR(eb->wrapped_editor->abort_edit(eb->wrapped_edit_baton, pool));
> +
> + return SVN_NO_ERROR;
> +}
> +
> svn_error_t *
> svn_delta_get_cancellation_editor(svn_cancel_func_t cancel_func,
> void *cancel_baton,
> @@ -365,6 +378,7 @@ svn_delta_get_cancellation_editor(svn_cancel_func_
> tree_editor->close_file = close_file;
> tree_editor->absent_file = absent_file;
> tree_editor->close_edit = close_edit;
> + tree_editor->abort_edit = abort_edit;
>
> eb->wrapped_editor = wrapped_editor;
> eb->wrapped_edit_baton = wrapped_edit_baton;
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: dev-help_at_subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-04-03 01:47:42 CEST