Author: stsp
Date: Wed Nov 27 14:15:38 2013
New Revision: 1546041
URL: http://svn.apache.org/r1546041
Log:
On the verify-keep-going branch, tweak generation of the error summary.
This fixes a small layering violation, and also changes the output a bit.
* subversion/libsvn_repos/dump.c
(notify_verification_error_summary): Don't populate notify->warning_str.
The warning string is intended to be used for svn_repos_notify_warning,
not for svn_repos_notify_failure_summary.
Instead, we can rely on API users to obtain and display error messages
based on notify->err. This was a small layering violation since API
users might want to use a different string representation anyway.
* subversion/svnadmin/svnadmin.c
(repos_notify_handler): Make 'svnadmin' generate an error message display
based on the error chain saved in notify->err. Display all interesting
(i.e. non-tracing) errors in the error chain saved for a revision.
Also, pad the output so that error messages are aligned for revision
numbers with up to 6 digits (TODO: padding could account for larger
revision numbers, like 'svn blame' does).
Modified:
subversion/branches/verify-keep-going/subversion/libsvn_repos/dump.c
subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c
Modified: subversion/branches/verify-keep-going/subversion/libsvn_repos/dump.c
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/libsvn_repos/dump.c?rev=1546041&r1=1546040&r2=1546041&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/libsvn_repos/dump.c
(original)
+++ subversion/branches/verify-keep-going/subversion/libsvn_repos/dump.c Wed
Nov 27 14:15:38 2013
@@ -2065,7 +2065,6 @@ notify_verification_error_summary(svn_re
apr_pool_t *pool)
{
svn_repos_notify_t *notify_failure;
- char errbuf[512]; /* ### svn_strerror() magic number */
if (notify_func == NULL)
return;
@@ -2073,11 +2072,6 @@ notify_verification_error_summary(svn_re
notify_failure = svn_repos_notify_create(svn_repos_notify_failure_summary,
pool);
notify_failure->err = err;
- notify_failure->warning_str = apr_psprintf(pool,
- _("E%06d: %s"),
- err->apr_err,
- svn_err_best_message(err, errbuf,
-
sizeof(errbuf)));
notify_failure->revision = rev;
notify_func(notify_baton, notify_failure, pool);
}
Modified: subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c
URL:
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c?rev=1546041&r1=1546040&r2=1546041&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c
(original)
+++ subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c Wed
Nov 27 14:15:38 2013
@@ -835,9 +835,27 @@ repos_notify_handler(void *baton,
case svn_repos_notify_failure_summary:
if (notify->revision != SVN_INVALID_REVNUM)
- svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
- _("r%ld: %s \n"),
- notify->revision, notify->warning_str));
+ {
+ svn_error_t *err;
+ const char *rev_str;
+
+ rev_str = apr_psprintf(scratch_pool, "r%ld", notify->revision);
+ for (err = svn_error_purge_tracing(notify->err);
+ err != SVN_NO_ERROR; err = err->child)
+ {
+ char buf[512];
+ const char *message;
+
+ if (err != SVN_NO_ERROR)
+ {
+ message = svn_err_best_message(err, buf, sizeof(buf));
+ svn_error_clear(svn_stream_printf(feedback_stream,
+ scratch_pool,
+ "%6s: %s\n",
+ rev_str, message));
+ }
+ }
+ }
return;
case svn_repos_notify_summary: