Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CEADC959A for ; Sat, 5 May 2012 21:35:50 +0000 (UTC) Received: (qmail 93990 invoked by uid 500); 5 May 2012 21:35:50 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 93970 invoked by uid 500); 5 May 2012 21:35:50 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 93962 invoked by uid 99); 5 May 2012 21:35:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 May 2012 21:35:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 May 2012 21:35:49 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 384532388A3F; Sat, 5 May 2012 21:35:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1334512 - /subversion/branches/ev2-export/subversion/libsvn_client/commit_util.c Date: Sat, 05 May 2012 21:35:29 -0000 To: commits@subversion.apache.org From: hwright@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120505213529.384532388A3F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: hwright Date: Sat May 5 21:35:28 2012 New Revision: 1334512 URL: http://svn.apache.org/viewvc?rev=1334512&view=rev Log: On the ev2-export branch: Improve error tracing. * subversion/libsvn_client/commit_util.c (do_item_commit): Wrap errors at the source. Modified: subversion/branches/ev2-export/subversion/libsvn_client/commit_util.c Modified: subversion/branches/ev2-export/subversion/libsvn_client/commit_util.c URL: http://svn.apache.org/viewvc/subversion/branches/ev2-export/subversion/libsvn_client/commit_util.c?rev=1334512&r1=1334511&r2=1334512&view=diff ============================================================================== --- subversion/branches/ev2-export/subversion/libsvn_client/commit_util.c (original) +++ subversion/branches/ev2-export/subversion/libsvn_client/commit_util.c Sat May 5 21:35:28 2012 @@ -1564,7 +1564,8 @@ do_item_commit(svn_client_commit_item3_t /* If this item is supposed to be deleted, do so. */ if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_DELETE) { - err = svn_editor_delete(editor, repos_relpath, item->revision); + err = svn_error_trace( + svn_editor_delete(editor, repos_relpath, item->revision)); if (err) goto fixup_error; @@ -1575,8 +1576,9 @@ do_item_commit(svn_client_commit_item3_t /* if ((item->state_flags & SVN_CLIENT_COMMIT_ITEM_PROP_MODS) || (item->state_flags & SVN_CLIENT_COMMIT_ITEM_ADD))*/ { - err = svn_wc_prop_list2(&props, ctx->wc_ctx, item->path, scratch_pool, - scratch_pool); + err = svn_error_trace( + svn_wc_prop_list2(&props, ctx->wc_ctx, item->path, + scratch_pool, scratch_pool)); if (err) goto fixup_error; @@ -1591,10 +1593,12 @@ do_item_commit(svn_client_commit_item3_t /* Get a de-translated stream of the working contents, along with an appropriate checksum. */ - err = svn_client__get_detranslated_stream(&contents, &sha1_checksum, - &md5_checksum, - item->path, props, - scratch_pool, scratch_pool); + err = svn_error_trace( + svn_client__get_detranslated_stream(&contents, &sha1_checksum, + &md5_checksum, + item->path, props, + scratch_pool, + scratch_pool)); if (err) goto fixup_error; @@ -1610,37 +1614,43 @@ do_item_commit(svn_client_commit_item3_t Unfortunately, we aren't yet ideal, so the following will have to suffice. */ - err = svn_wc__node_pristine_get_tempdir(&pristine_tempdir, ctx->wc_ctx, - item->path, scratch_pool, - scratch_pool); + err = svn_error_trace( + svn_wc__node_pristine_get_tempdir(&pristine_tempdir, + ctx->wc_ctx, item->path, + scratch_pool, scratch_pool)); if (err) goto fixup_error; - err = svn_stream_open_unique(&tmp_stream, &pristine_temppath, - pristine_tempdir, - svn_io_file_del_none, scratch_pool, - scratch_pool); + err = svn_error_trace( + svn_stream_open_unique(&tmp_stream, &pristine_temppath, + pristine_tempdir, + svn_io_file_del_none, scratch_pool, + scratch_pool)); if (err) goto fixup_error; - err = svn_stream_copy3(contents, tmp_stream, ctx->cancel_func, - ctx->cancel_baton, scratch_pool); + err = svn_error_trace( + svn_stream_copy3(contents, tmp_stream, ctx->cancel_func, + ctx->cancel_baton, scratch_pool)); if (err) goto fixup_error; /* ### pristine_temppath should be in the pristine tempdir, but we ### don't honor that right now. :( */ - err = svn_wc__node_pristine_install(ctx->wc_ctx, pristine_temppath, - sha1_checksum, md5_checksum, - scratch_pool); + err = svn_error_trace( + svn_wc__node_pristine_install(ctx->wc_ctx, pristine_temppath, + sha1_checksum, md5_checksum, + scratch_pool)); if (err) goto fixup_error; - err = svn_wc__get_pristine_contents_by_checksum(&contents, ctx->wc_ctx, - item->path, - sha1_checksum, - scratch_pool, - scratch_pool); + err = svn_error_trace( + svn_wc__get_pristine_contents_by_checksum(&contents, + ctx->wc_ctx, + item->path, + sha1_checksum, + scratch_pool, + scratch_pool)); if (err) goto fixup_error; } @@ -1654,9 +1664,11 @@ do_item_commit(svn_client_commit_item3_t SVN_ERR_ASSERT(props != NULL); SVN_ERR_ASSERT(contents != NULL); SVN_ERR_ASSERT(sha1_checksum != NULL); - err = svn_editor_add_file(editor, repos_relpath, - sha1_checksum, contents, props, - SVN_INVALID_REVNUM); + + err = svn_error_trace( + svn_editor_add_file(editor, repos_relpath, + sha1_checksum, contents, props, + SVN_INVALID_REVNUM)); } else /* May be svn_node_none when adding parent dirs for a copy. */ { @@ -1666,9 +1678,12 @@ do_item_commit(svn_client_commit_item3_t SVN_ERR_ASSERT(props != NULL); - SVN_ERR(svn_wc__node_get_children(&children_abspaths, - ctx->wc_ctx, item->path, FALSE, - scratch_pool, scratch_pool)); + err = svn_error_trace( + svn_wc__node_get_children(&children_abspaths, + ctx->wc_ctx, item->path, FALSE, + scratch_pool, scratch_pool)); + if (err) + goto fixup_error; /* We have to strip out the basenames returned from the above function. */ @@ -1682,9 +1697,10 @@ do_item_commit(svn_client_commit_item3_t svn_dirent_basename(child_abspath, scratch_pool); } - err = svn_editor_add_directory(editor, repos_relpath, - children, props, - SVN_INVALID_REVNUM); + err = svn_error_trace( + svn_editor_add_directory(editor, repos_relpath, + children, props, + SVN_INVALID_REVNUM)); } if (err) @@ -1693,8 +1709,9 @@ do_item_commit(svn_client_commit_item3_t if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_IS_COPY) { - err = svn_editor_copy(editor, item->copyfrom_url, item->copyfrom_rev, - repos_relpath, SVN_INVALID_REVNUM); + err = svn_error_trace( + svn_editor_copy(editor, item->copyfrom_url, item->copyfrom_rev, + repos_relpath, SVN_INVALID_REVNUM)); if (err) goto fixup_error; @@ -1705,14 +1722,16 @@ do_item_commit(svn_client_commit_item3_t { if (item->kind == svn_node_file) { - err = svn_editor_alter_file(editor, repos_relpath, - SVN_INVALID_REVNUM, props, sha1_checksum, - contents); + err = svn_error_trace( + svn_editor_alter_file(editor, repos_relpath, + SVN_INVALID_REVNUM, props, + sha1_checksum, contents)); } else { - err = svn_editor_alter_directory(editor, repos_relpath, - SVN_INVALID_REVNUM, props); + err = svn_error_trace( + svn_editor_alter_directory(editor, repos_relpath, + SVN_INVALID_REVNUM, props)); } if (err)