Index: error.c =================================================================== --- error.c (revision 7520) +++ error.c (working copy) @@ -224,8 +224,7 @@ static void -handle_error (svn_error_t *err, FILE *stream, svn_boolean_t fatal, - int depth, apr_status_t parent_apr_err) +print_error (svn_error_t *err, FILE *stream, svn_boolean_t new_message) { char errbuf[256]; const char *err_string; @@ -244,9 +243,8 @@ fprintf (stream, ": (apr_err=%d)\n", err->apr_err); #endif /* SVN_DEBUG */ - /* When we're recursing, don't repeat the top-level message if its - the same as before. */ - if (depth == 0 || err->apr_err != parent_apr_err) + /* Only print the same APR error string once. */ + if (new_message) { /* Is this a Subversion-specific error code? */ if ((err->apr_err > APR_OS_START_USEERR) @@ -264,19 +262,24 @@ convert_string_for_output (err->message, err->pool)); fflush (stream); - if (err->child) - handle_error (err->child, stream, FALSE, depth + 1, err->apr_err); - - if (fatal) - /* XXX Shouldn't we exit(1) here instead, so that atexit handlers - get called? --xbc */ - abort (); } void svn_handle_error (svn_error_t *err, FILE *stream, svn_boolean_t fatal) { - handle_error (err, stream, fatal, 0, APR_SUCCESS); + apr_status_t last_apr_err = APR_SUCCESS; + for(last_apr_err = APR_SUCCESS; + err != NULL; + last_apr_err = err->apr_err , err = err->child) + { + + print_error (err, stream, last_apr_err != err->apr_err); + + if (fatal) + /* XXX Shouldn't we exit(1) here instead, so that atexit handlers + get called? --xbc */ + abort (); + } }