Author: brane
Date: Tue Jun 9 07:47:55 2015
New Revision: 1684344
URL: http://svn.apache.org/r1684344
Log:
Follow up to r1684325: Move the "fix" from libsvn_repos to svnadmin,
because it was responsible for the double error notification.
* subversion/libsvn_repos/dump.c: Revert r1684325.
(svn_repos_verify_fs3): Revert to always sending error notifications.
* subversion/svnadmin/svnadmin.c
(repos_notify_handler_baton): New member silent_errors.
(repos_notify_handler): I the svn_repos_notify_failure case,
always print the notification but print the error itself
only if the baton's silent_errors member is FALSE.
(subcommand_verify): Silence errors in the notificaiton handler
if --keep-going was not used.
Modified:
subversion/trunk/subversion/libsvn_repos/dump.c
subversion/trunk/subversion/svnadmin/svnadmin.c
Modified: subversion/trunk/subversion/libsvn_repos/dump.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/dump.c?rev=1684344&r1=1684343&r2=1684344&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/dump.c (original)
+++ subversion/trunk/subversion/libsvn_repos/dump.c Tue Jun 9 07:47:55 2015
@@ -2430,6 +2430,9 @@ svn_repos_verify_fs3(svn_repos_t *repos,
}
else if (err)
{
+ notify_verification_error(SVN_INVALID_REVNUM, err, notify_func,
+ notify_baton, iterpool);
+
if (!keep_going)
{
/* Return the error, the caller doesn't want us to continue. */
@@ -2437,9 +2440,7 @@ svn_repos_verify_fs3(svn_repos_t *repos,
}
else
{
- /* Notify about the error, clear it and keep going. */
- notify_verification_error(SVN_INVALID_REVNUM, err, notify_func,
- notify_baton, iterpool);
+ /* Clear the error and keep going. */
failed_metadata = TRUE;
svn_error_clear(err);
}
@@ -2462,6 +2463,9 @@ svn_repos_verify_fs3(svn_repos_t *repos,
}
else if (err)
{
+ notify_verification_error(rev, err, notify_func, notify_baton,
+ iterpool);
+
if (!keep_going)
{
/* Return the error, the caller doesn't want us to continue. */
@@ -2469,9 +2473,7 @@ svn_repos_verify_fs3(svn_repos_t *repos,
}
else
{
- /* Notify about the error, clear it and keep going. */
- notify_verification_error(rev, err, notify_func, notify_baton,
- iterpool);
+ /* Clear the error and keep going. */
++failed_revisions;
svn_error_clear(err);
}
Modified: subversion/trunk/subversion/svnadmin/svnadmin.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/svnadmin.c?rev=1684344&r1=1684343&r2=1684344&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/svnadmin.c (original)
+++ subversion/trunk/subversion/svnadmin/svnadmin.c Tue Jun 9 07:47:55 2015
@@ -868,6 +868,11 @@ struct repos_notify_handler_baton {
/* Stream to write progress and other non-error output to. */
svn_stream_t *feedback_stream;
+ /* Whether errors contained in notifications should be printed along
+ with the notification. If FALSE, any errors will only be
+ summarized. */
+ svn_boolean_t silent_errors;
+
/* List of errors encountered during 'svnadmin verify --keep-going'. */
apr_array_header_t *error_summary;
@@ -901,8 +906,10 @@ repos_notify_handler(void *baton,
notify->revision));
if (notify->err)
{
- svn_handle_error2(notify->err, stderr, FALSE /* non-fatal */,
- "svnadmin: ");
+ if (!b->silent_errors)
+ svn_handle_error2(notify->err, stderr, FALSE /* non-fatal */,
+ "svnadmin: ");
+
if (b->error_summary && notify->revision != SVN_INVALID_REVNUM)
{
struct verification_error *verr;
@@ -1837,6 +1844,8 @@ subcommand_verify(apr_getopt_t *os, void
if (opt_state->keep_going)
notify_baton.error_summary =
apr_array_make(pool, 0, sizeof(struct verification_error *));
+ else
+ notify_baton.silent_errors = TRUE;
notify_baton.result_pool = pool;