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 2011/08/05 00:03:36 UTC

svn commit: r1154034 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_repos/commit.c

Author: hwright
Date: Thu Aug  4 22:03:35 2011
New Revision: 1154034

URL: http://svn.apache.org/viewvc?rev=1154034&view=rev
Log:
Merge r1150302 from trunk:

 * r1150302
   Avoid closing fs txns multiple times.
   Justification:
     We should follow our own api documentation.
   Notes:
     This error is invisible to users without the r1150254 group (upon which
     this revision depends for a clean merge).
   Votes:
     +1: rhuijben, danielsh, cmpilato

Modified:
    subversion/branches/1.7.x/   (props changed)
    subversion/branches/1.7.x/STATUS
    subversion/branches/1.7.x/subversion/libsvn_repos/commit.c

Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug  4 22:03:35 2011
@@ -54,4 +54,4 @@
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
 /subversion/branches/uris-as-urls:1060426-1064427
-/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149401,1149539,1149572,1149627,1149675,1149701,1149713,1150242,1150254,1150260-1150261,1150266,1150327,1150368,1150372,1150441,1150506,1150812,1150853,1151036,1151177,1151610,1151911,1152129,1152140,1152282,1152726,1153416,1153799,1153807,1153968
+/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149401,1149539,1149572,1149627,1149675,1149701,1149713,1150242,1150254,1150260-1150261,1150266,1150302,1150327,1150368,1150372,1150441,1150506,1150812,1150853,1151036,1151177,1151610,1151911,1152129,1152140,1152282,1152726,1153416,1153799,1153807,1153968

Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1154034&r1=1154033&r2=1154034&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Thu Aug  4 22:03:35 2011
@@ -153,13 +153,3 @@ Veto-blocked changes:
 
 Approved changes:
 =================
-
- * r1150302
-   Avoid closing fs txns multiple times.
-   Justification:
-     We should follow our own api documentation.
-   Notes:
-     This error is invisible to users without the r1150254 group (upon which
-     this revision depends for a clean merge).
-   Votes:
-     +1: rhuijben, danielsh, cmpilato

Modified: subversion/branches/1.7.x/subversion/libsvn_repos/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_repos/commit.c?rev=1154034&r1=1154033&r2=1154034&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_repos/commit.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_repos/commit.c Thu Aug  4 22:03:35 2011
@@ -94,6 +94,9 @@ struct edit_baton
   /* The object representing the root directory of the svn txn. */
   svn_fs_root_t *txn_root;
 
+  /* Avoid aborting an fs transaction more than once */
+  svn_boolean_t txn_aborted;
+
   /** Filled in when the edit is closed: **/
 
   /* The new revision created by this commit. */
@@ -720,6 +723,8 @@ close_edit(void *edit_baton,
          aborted completely.  No second chances;  the user simply
          needs to update and commit again  :) */
 
+      eb->txn_aborted = TRUE;
+
       return svn_error_trace(
                 svn_error_compose_create(err,
                                          svn_fs_abort_txn(eb->txn, pool)));
@@ -768,9 +773,12 @@ abort_edit(void *edit_baton,
            apr_pool_t *pool)
 {
   struct edit_baton *eb = edit_baton;
-  if ((! eb->txn) || (! eb->txn_owner))
+  if ((! eb->txn) || (! eb->txn_owner) || eb->txn_aborted)
     return SVN_NO_ERROR;
-  return svn_fs_abort_txn(eb->txn, pool);
+
+  eb->txn_aborted = TRUE;
+
+  return svn_error_trace(svn_fs_abort_txn(eb->txn, pool));
 }