subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1160615 - /subversion/trunk/subversion/libsvn_wc/wc_db.c
Date Tue, 23 Aug 2011 10:51:56 GMT
Author: rhuijben
Date: Tue Aug 23 10:51:56 2011
New Revision: 1160615

URL: http://svn.apache.org/viewvc?rev=1160615&view=rev
Log:
* subversion/libsvn_wc/wc_db.c
  (op_revert_recursive_txn): Make sure statements are properly reset.
  (op_delete_txn): Document another missing statement reset, but don't fix it
    yet.

Modified:
    subversion/trunk/subversion/libsvn_wc/wc_db.c

Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db.c?rev=1160615&r1=1160614&r2=1160615&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db.c Tue Aug 23 10:51:56 2011
@@ -5414,13 +5414,20 @@ op_revert_recursive_txn(void *baton,
   while (have_row)
     {
       const char *moved_here_child_relpath;
+      svn_error_t *err;
 
       svn_pool_clear(iterpool);
 
       moved_here_child_relpath = svn_sqlite__column_text(stmt, 0, iterpool);
-      SVN_ERR(clear_moved_to(moved_here_child_relpath, wcroot, iterpool));
+      err = clear_moved_to(moved_here_child_relpath, wcroot, iterpool);
+      if (err)
+        return svn_error_trace(svn_error_compose_create(
+                                        err,
+                                        svn_sqlite__reset(stmt)));
+
       SVN_ERR(svn_sqlite__step(&have_row, stmt));
     }
+  SVN_ERR(svn_sqlite__reset(stmt));
   svn_pool_destroy(iterpool);
 
   /* Clear potential moved-to pointing at the target node itself. */
@@ -6344,6 +6351,7 @@ op_delete_txn(void *baton,
                     svn_relpath_join(b->moved_to_relpath,
                                      child_subtree_relpath, iterpool);
                   /* ... and update the BASE moved-to record. */
+                  /* ### On errors the next 4 statements don't reset STMT */
                   SVN_ERR(svn_sqlite__get_statement(
                             &moved_to_stmt, wcroot->sdb,
                             STMT_UPDATE_MOVED_TO_RELPATH));



Mime
View raw message