You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/07/05 13:47:07 UTC
svn commit: r1142998 - in /subversion/trunk/subversion/libsvn_repos:
reporter.c repos.c
Author: rhuijben
Date: Tue Jul 5 11:47:07 2011
New Revision: 1142998
URL: http://svn.apache.org/viewvc?rev=1142998&view=rev
Log:
Don't just clear some errors when we can report multiple errors in
a single error chain.
* subversion/libsvn_repos/reporter.c
(finish_report): Add svn_error_trace. Also return errors from aborting.
(svn_repos_finish_report): Also return disk io errors.
(svn_repos_abort_report): Add svn_error_trace.
* subversion/libsvn_repos/repos.c
(svn_repos_create): Also return cleanup errors.
Modified:
subversion/trunk/subversion/libsvn_repos/reporter.c
subversion/trunk/subversion/libsvn_repos/repos.c
Modified: subversion/trunk/subversion/libsvn_repos/reporter.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/reporter.c?rev=1142998&r1=1142997&r2=1142998&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/reporter.c (original)
+++ subversion/trunk/subversion/libsvn_repos/reporter.c Tue Jul 5 11:47:07 2011
@@ -1331,9 +1331,12 @@ finish_report(report_baton_t *b, apr_poo
{
svn_error_t *err = drive(b, s_rev, info, pool);
if (err == SVN_NO_ERROR)
- return b->editor->close_edit(b->edit_baton, pool);
- svn_error_clear(b->editor->abort_edit(b->edit_baton, pool));
- return svn_error_trace(err);
+ return svn_error_trace(b->editor->close_edit(b->edit_baton, pool));
+
+ return svn_error_trace(
+ svn_error_compose_create(err,
+ b->editor->abort_edit(b->edit_baton,
+ pool)));
}
}
@@ -1421,9 +1424,8 @@ svn_repos_finish_report(void *baton, apr
finish_err = finish_report(b, pool);
close_err = svn_io_file_close(b->tempfile, pool);
- if (finish_err)
- svn_error_clear(close_err);
- return finish_err ? finish_err : close_err;
+
+ return svn_error_trace(svn_error_compose_create(finish_err, close_err));
}
svn_error_t *
@@ -1431,7 +1433,7 @@ svn_repos_abort_report(void *baton, apr_
{
report_baton_t *b = baton;
- return svn_io_file_close(b->tempfile, pool);
+ return svn_error_trace(svn_io_file_close(b->tempfile, pool));
}
/* --- BEGINNING THE REPORT --- */
Modified: subversion/trunk/subversion/libsvn_repos/repos.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/repos.c?rev=1142998&r1=1142997&r2=1142998&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/repos.c (original)
+++ subversion/trunk/subversion/libsvn_repos/repos.c Tue Jul 5 11:47:07 2011
@@ -1262,9 +1262,13 @@ svn_repos_create(svn_repos_t **repos_p,
/* If there was an error making the filesytem, e.g. unknown/supported
* filesystem type. Clean up after ourselves. Yes this is safe because
* create_repos_structure will fail if the path existed before we started
- * so we can't accidentally remove a directory that previously existed. */
- svn_error_clear(svn_io_remove_dir2(path, FALSE, NULL, NULL, pool));
- return svn_error_trace(err);
+ * so we can't accidentally remove a directory that previously existed.
+ */
+
+ return svn_error_trace(
+ svn_error_compose_create(
+ err,
+ svn_io_remove_dir2(path, FALSE, NULL, NULL, pool)));
}
/* This repository is ready. Stamp it with a format number. */