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:00:56 UTC

svn commit: r1154032 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_client/commit.c subversion/libsvn_fs_fs/fs_fs.c subversion/libsvn_repos/commit.c subversion/libsvn_wc/adm_crawler.c

Author: hwright
Date: Thu Aug  4 22:00:55 2011
New Revision: 1154032

URL: http://svn.apache.org/viewvc?rev=1154032&view=rev
Log:
Merge r1150254, r1150260, r1150261, r1150266 from trunk:

 * r1150254, r1150260, r1150261, r1150266
   Return errors by composing instead of ignoring them.
   Justification:
     Returning more errors makes it much easier to diagnose problems.
   Notes:
     This patchgroup contains a few patches that together enable seeing
     a few previous invisible error chains.
     r1150254: Improve error handling in svn_wc__internal_transmit_text_deltas.
     r1150260: Return txn unlock errors from fsfs.
     r1150261: Return txn abort errors when the editor decides to abort itself.
     r1150266: Return editor abort errors when the commit processing aborts.
   Votes:
     +1: rhuijben (after r1150302 and r1150327 are backported)
     +1: danielsh, gstein

Modified:
    subversion/branches/1.7.x/   (props changed)
    subversion/branches/1.7.x/STATUS
    subversion/branches/1.7.x/subversion/libsvn_client/commit.c
    subversion/branches/1.7.x/subversion/libsvn_fs_fs/fs_fs.c
    subversion/branches/1.7.x/subversion/libsvn_repos/commit.c
    subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c

Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Aug  4 22:00:55 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,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,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=1154032&r1=1154031&r2=1154032&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Thu Aug  4 22:00:55 2011
@@ -154,21 +154,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1150254, r1150260, r1150261, r1150266
-   Return errors by composing instead of ignoring them.
-   Justification:
-     Returning more errors makes it much easier to diagnose problems.
-   Notes:
-     This patchgroup contains a few patches that together enable seeing
-     a few previous invisible error chains.
-     r1150254: Improve error handling in svn_wc__internal_transmit_text_deltas.
-     r1150260: Return txn unlock errors from fsfs.
-     r1150261: Return txn abort errors when the editor decides to abort itself.
-     r1150266: Return editor abort errors when the commit processing aborts.
-   Votes:
-     +1: rhuijben (after r1150302 and r1150327 are backported)
-     +1: danielsh, gstein
-
  * r1150302
    Avoid closing fs txns multiple times.
    Justification:

Modified: subversion/branches/1.7.x/subversion/libsvn_client/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_client/commit.c?rev=1154032&r1=1154031&r2=1154032&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_client/commit.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_client/commit.c Thu Aug  4 22:00:55 2011
@@ -1453,7 +1453,8 @@ svn_client_commit5(const apr_array_heade
   /* Abort the commit if it is still in progress. */
   svn_pool_clear(iterpool); /* Close open handles before aborting */
   if (commit_in_progress)
-    svn_error_clear(editor->abort_edit(edit_baton, pool));
+    cmt_err = svn_error_compose_create(cmt_err,
+                                       editor->abort_edit(edit_baton, pool));
 
   /* A bump error is likely to occur while running a working copy log file,
      explicitly unlocking and removing temporary files would be wrong in

Modified: subversion/branches/1.7.x/subversion/libsvn_fs_fs/fs_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_fs_fs/fs_fs.c?rev=1154032&r1=1154031&r2=1154032&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_fs_fs/fs_fs.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_fs_fs/fs_fs.c Thu Aug  4 22:00:55 2011
@@ -826,8 +826,10 @@ get_writable_proto_rev_body(svn_fs_t *fs
 
   if (err)
     {
-      svn_error_clear(unlock_proto_rev_list_locked(fs, txn_id, *lockcookie,
-                                                   pool));
+      err = svn_error_compose_create(
+              err,
+              unlock_proto_rev_list_locked(fs, txn_id, *lockcookie, pool));
+      
       *lockcookie = NULL;
     }
 

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=1154032&r1=1154031&r2=1154032&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:00:55 2011
@@ -718,12 +718,11 @@ close_edit(void *edit_baton,
          So, in a nutshell: svn commits are an all-or-nothing deal.
          Each commit creates a new fs txn which either succeeds or is
          aborted completely.  No second chances;  the user simply
-         needs to update and commit again  :)
+         needs to update and commit again  :) */
 
-         We ignore the possible error result from svn_fs_abort_txn();
-         it's more important to return the original error. */
-      svn_error_clear(svn_fs_abort_txn(eb->txn, pool));
-      return svn_error_trace(err);
+      return svn_error_trace(
+                svn_error_compose_create(err,
+                                         svn_fs_abort_txn(eb->txn, pool)));
     }
 
   /* Pass new revision information to the caller's callback. */

Modified: subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c?rev=1154032&r1=1154031&r2=1154032&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c Thu Aug  4 22:00:55 2011
@@ -1112,21 +1112,12 @@ svn_wc__internal_transmit_text_deltas(co
                         NULL, NULL,
                         scratch_pool, scratch_pool);
 
-  /* Close the two streams to force writing the digest,
-     if we already have an error, ignore this one. */
-  if (err)
-    {
-      svn_error_clear(svn_stream_close(base_stream));
-      svn_error_clear(svn_stream_close(local_stream));
-    }
-  else
-    {
-      SVN_ERR(svn_stream_close(base_stream));
-      SVN_ERR(svn_stream_close(local_stream));
-    }
+  /* Close the two streams to force writing the digest */
+  err = svn_error_compose_create(err, svn_stream_close(base_stream));
+  err = svn_error_compose_create(err, svn_stream_close(local_stream));
 
-  /* If we have an error, it may be caused by a corrupt text base.
-     Check the checksum and discard `err' if they don't match. */
+  /* If we have an error, it may be caused by a corrupt text base,
+     so check the checksum. */
   if (expected_md5_checksum && verify_checksum
       && !svn_checksum_match(expected_md5_checksum, verify_checksum))
     {
@@ -1142,19 +1133,20 @@ svn_wc__internal_transmit_text_deltas(co
          investigate.  Other commands could be affected,
          too, such as `svn diff'.  */
 
-      /* Deliberately ignore errors; the error about the
-         checksum mismatch is more important to return. */
-      svn_error_clear(err);
       if (tempfile)
-        svn_error_clear(svn_io_remove_file2(*tempfile, TRUE, scratch_pool));
+        err = svn_error_compose_create(
+                      err,
+                      svn_io_remove_file2(*tempfile, TRUE, scratch_pool));
 
-      return svn_error_create(SVN_ERR_WC_CORRUPT_TEXT_BASE,
-            svn_checksum_mismatch_err(expected_md5_checksum, verify_checksum,
+      err = svn_error_compose_create(
+              svn_checksum_mismatch_err(expected_md5_checksum, verify_checksum,
                             scratch_pool,
                             _("Checksum mismatch for text base of '%s'"),
                             svn_dirent_local_style(local_abspath,
                                                    scratch_pool)),
-            NULL);
+              err);
+
+      return svn_error_create(SVN_ERR_WC_CORRUPT_TEXT_BASE, err, NULL);
     }
 
   /* Now, handle that delta transmission error if any, so we can stop