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

[PATCH] Cancellation editor discards abort_edit

From: Eric Gillespie <epg_at_pretzelnet.org>
Date: Wed, 02 Apr 2008 10:53:39 -0700

[[[
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.
]]]

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
Received on 2008-04-02 19:53:50 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.