subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1631557 - /subversion/trunk/subversion/libsvn_repos/dump.c
Date Mon, 13 Oct 2014 21:24:59 GMT
Author: stefan2
Date: Mon Oct 13 21:24:59 2014
New Revision: 1631557

URL: http://svn.apache.org/r1631557
Log:
Improve the error reporting of svn_repos_verify_fs3 with KEEP_GOING off
if no notification callback has been provided, i.e. when looking for
the first corruption issue.

* subversion/libsvn_repos/dump.c
  (svn_repos_verify_fs3): Make the detected error part of the error chain
                          returned when it did not get reported, yet.

Modified:
    subversion/trunk/subversion/libsvn_repos/dump.c

Modified: subversion/trunk/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/dump.c?rev=1631557&r1=1631556&r2=1631557&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_repos/dump.c (original)
+++ subversion/trunk/subversion/libsvn_repos/dump.c Mon Oct 13 21:24:59 2014
@@ -2245,16 +2245,26 @@ svn_repos_verify_fs3(svn_repos_t *repos,
       found_corruption = TRUE;
       notify_verification_error(SVN_INVALID_REVNUM, err, notify_func,
                                 notify_baton, iterpool);
-      svn_error_clear(err);
 
+      /* If we already reported the error, reset it. */
+      if (notify_func)
+        {
+          svn_error_clear(err);
+          err = NULL;
+        }
+
+      /* If we abort the verification now, combine yet unreported error
+         info with the generic one we return. */
       if (!keep_going)
         /* ### Jump to "We're done" and so send the final notification,
                for consistency? */
-        return svn_error_createf(SVN_ERR_REPOS_CORRUPTED, NULL,
+        return svn_error_createf(SVN_ERR_REPOS_CORRUPTED, err,
                                 _("Repository '%s' failed to verify"),
                                 svn_dirent_local_style(svn_repos_path(repos,
                                                                       pool),
                                                         pool));
+
+      svn_error_clear(err);
     }
 
   if (!metadata_only)



Mime
View raw message