You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2012/02/07 21:45:03 UTC

svn commit: r1241608 - /subversion/trunk/subversion/libsvn_delta/compat.c

Author: hwright
Date: Tue Feb  7 20:45:03 2012
New Revision: 1241608

URL: http://svn.apache.org/viewvc?rev=1241608&view=rev
Log:
Ev2 shims: Don't attempt to drive an editor multiple times.

Current number of Ev2 test failures: 9

* subversion/libsvn_delta/compat.c
  (editor_baton): New driven member.
  (complete_cb): Mark the editor driven.
  (abort_db): Don't drive the editor a second time if it's already been tried.

Modified:
    subversion/trunk/subversion/libsvn_delta/compat.c

Modified: subversion/trunk/subversion/libsvn_delta/compat.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_delta/compat.c?rev=1241608&r1=1241607&r2=1241608&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_delta/compat.c (original)
+++ subversion/trunk/subversion/libsvn_delta/compat.c Tue Feb  7 20:45:03 2012
@@ -986,6 +986,8 @@ struct editor_baton
   struct operation root;
   svn_boolean_t *make_abs_paths;
 
+  svn_boolean_t driven;
+
   apr_hash_t *paths;
   apr_pool_t *edit_pool;
 };
@@ -1664,6 +1666,7 @@ complete_cb(void *baton,
 
   /* Drive the tree we've created. */
   err = drive_root(&eb->root, eb->deditor, *eb->make_abs_paths, scratch_pool);
+  eb->driven = TRUE;
   if (!err)
      {
        err = svn_error_compose_create(err, eb->deditor->close_edit(
@@ -1683,14 +1686,16 @@ abort_cb(void *baton,
          apr_pool_t *scratch_pool)
 {
   struct editor_baton *eb = baton;
-  svn_error_t *err;
+  svn_error_t *err = SVN_NO_ERROR;
   svn_error_t *err2;
 
   /* We still need to drive anything we collected in the editor to this
      point. */
 
   /* Drive the tree we've created. */
-  err = drive_root(&eb->root, eb->deditor, *eb->make_abs_paths, scratch_pool);
+  if (!eb->driven)
+    err = drive_root(&eb->root, eb->deditor, *eb->make_abs_paths,
+                     scratch_pool);
 
   err2 = eb->deditor->abort_edit(eb->dedit_baton, scratch_pool);