You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2015/07/01 06:00:27 UTC

svn commit: r1688547 - in /subversion/branches/1.9.x: ./ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apache/subversion/javahl/ subversion/include/ subversion/libsvn_repos/ subversion/svnadmin/ subversion/tests/cmdline/ subvers...

Author: svn-role
Date: Wed Jul  1 04:00:26 2015
New Revision: 1688547

URL: http://svn.apache.org/r1688547
Log:
Merge the r1684940 group from trunk:

 * r1684940, r1685034, r1687769, r1687776
   Make 'svnadmin verify --keep-going --quiet' print error details to stderr,
   as documented by 'svnadmin help verify'.
   Justification:
     Calling a command with --quiet should not hide important parts of the
     output, such as verification errors.  Without this fix, 'svnadmin verify
     --keep-going --quiet' is rather useless in terms that it only gives an
     indication of whether a particular repository passes the verification or
     not, but doesn't show the root cause (error details) of what's wrong.
   Notes:
     This change features a redesign of the error reporting scheme being used
     by svn_repos_verify_fs3() API.  At some point we realized that the way
     API was working previously forced us to write rather hacky code on the
     calling side in order to achieve the wanted behavior.  With the API
     redesign, this is no longer needed.  Full discussion can be found in
     http://svn.haxx.se/dev/archive-2015-05/0141.shtml (Subject: "Possible
     incompatibility of svn_repos_verify_fs2() in 1.9.0-rc1").
     .
     r1684940 and r1685034 contain the initial fix for this problem and the
     test.  r1687769 is the core fix that changes svn_repos_verify_fs3() API
     and supersedes the fix from r1684940.  r1687776 is a documentation-only
     follow-up to r1687769.  This is a 1.9.0 blocker due to a change in the
     unreleased API.
   Votes:
     +1: kotkov, rhuijben, brane

Modified:
    subversion/branches/1.9.x/   (props changed)
    subversion/branches/1.9.x/STATUS
    subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNRepos.cpp
    subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNRepos.h
    subversion/branches/1.9.x/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp
    subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java
    subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java
    subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java
    subversion/branches/1.9.x/subversion/include/svn_error_codes.h
    subversion/branches/1.9.x/subversion/include/svn_repos.h
    subversion/branches/1.9.x/subversion/libsvn_repos/deprecated.c
    subversion/branches/1.9.x/subversion/libsvn_repos/dump.c
    subversion/branches/1.9.x/subversion/svnadmin/svnadmin.c
    subversion/branches/1.9.x/subversion/tests/cmdline/svnadmin_tests.py
    subversion/branches/1.9.x/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c
    subversion/branches/1.9.x/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c

Propchange: subversion/branches/1.9.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul  1 04:00:26 2015
@@ -93,4 +93,4 @@
 /subversion/branches/verify-at-commit:1462039-1462408
 /subversion/branches/verify-keep-going:1439280-1546110
 /subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663530,1663671,1663697,1663706,1663738,1663749,1663791,1663991,1664035,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664593-1664594,1664596,1664653,1664664,1664672,1664674,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665213,1665259,1665318,1665437-1665438,1665609,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666258,1666270,1666272,1666379,1666449,1666690,1666832,1666851,1666965,1667101,1667106-1667107,1667120,1667228,1667233-1667235,1667249-1667250,1667258,1667290,1667301,1667471,1667691-1667693,1667699-1667700,1667715,1667941,1667976,1668320,1668598-1668600,1668602-1668603,1668607-1668608,1668618,1669743,1669746,1669749,1669945,1670139,1670149,1670152,1670329,1670337,167
 0347,1670353,1671164,1671388,1672295,1672311,1672372,1672404,1672511-1672512,1672578,1672728,1673044,1673062-1673063,1673065,1673153,1673170,1673172,1673197,1673202,1673204,1673228,1673282,1673445,1673691-1673692,1673746,1673785,1673803,1674015,1674032,1674170,1674301,1674305,1674308,1674339-1674340,1674406,1674415,1674455-1674456,1674475,1674487,1674522,1674580,1674627,1674891,1675771,1675774,1676526,1676535,1676538,1676555,1676564,1676570,1676665,1676667,1676769,1677003,1677191,1677267,1677440,1678147,1678149,1678494,1678571,1678734,1678742,1678745-1678746,1678839,1678846,1678894,1678950,1678963,1679166,1679169,1679228,1679230,1679287,1679864,1679866,1679909,1680242,1680264,1680495,1680705,1680819,1681317,1682714,1682854,1683071,1683126,1683135,1683290,1683303,1683311,1683378,1683387,1684034,1684077,1684322,1684325,1684344,1684412,1685085,1686239,1686478,1686541,1686543,1686554,1686557,1686802,1686888,1686984
+/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663530,1663671,1663697,1663706,1663738,1663749,1663791,1663991,1664035,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664593-1664594,1664596,1664653,1664664,1664672,1664674,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665213,1665259,1665318,1665437-1665438,1665609,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666258,1666270,1666272,1666379,1666449,1666690,1666832,1666851,1666965,1667101,1667106-1667107,1667120,1667228,1667233-1667235,1667249-1667250,1667258,1667290,1667301,1667471,1667691-1667693,1667699-1667700,1667715,1667941,1667976,1668320,1668598-1668600,1668602-1668603,1668607-1668608,1668618,1669743,1669746,1669749,1669945,1670139,1670149,1670152,1670329,1670337,167
 0347,1670353,1671164,1671388,1672295,1672311,1672372,1672404,1672511-1672512,1672578,1672728,1673044,1673062-1673063,1673065,1673153,1673170,1673172,1673197,1673202,1673204,1673228,1673282,1673445,1673691-1673692,1673746,1673785,1673803,1674015,1674032,1674170,1674301,1674305,1674308,1674339-1674340,1674406,1674415,1674455-1674456,1674475,1674487,1674522,1674580,1674627,1674891,1675771,1675774,1676526,1676535,1676538,1676555,1676564,1676570,1676665,1676667,1676769,1677003,1677191,1677267,1677440,1678147,1678149,1678494,1678571,1678734,1678742,1678745-1678746,1678839,1678846,1678894,1678950,1678963,1679166,1679169,1679228,1679230,1679287,1679864,1679866,1679909,1680242,1680264,1680495,1680705,1680819,1681317,1682714,1682854,1683071,1683126,1683135,1683290,1683303,1683311,1683378,1683387,1684034,1684077,1684322,1684325,1684344,1684412,1684940,1685034,1685085,1686239,1686478,1686541,1686543,1686554,1686557,1686802,1686888,1686984,1687769,1687776

Modified: subversion/branches/1.9.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/STATUS?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/STATUS (original)
+++ subversion/branches/1.9.x/STATUS Wed Jul  1 04:00:26 2015
@@ -47,32 +47,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1684940, r1685034, r1687769, r1687776
-   Make 'svnadmin verify --keep-going --quiet' print error details to stderr,
-   as documented by 'svnadmin help verify'.
-   Justification:
-     Calling a command with --quiet should not hide important parts of the
-     output, such as verification errors.  Without this fix, 'svnadmin verify
-     --keep-going --quiet' is rather useless in terms that it only gives an
-     indication of whether a particular repository passes the verification or
-     not, but doesn't show the root cause (error details) of what's wrong.
-   Notes:
-     This change features a redesign of the error reporting scheme being used
-     by svn_repos_verify_fs3() API.  At some point we realized that the way
-     API was working previously forced us to write rather hacky code on the
-     calling side in order to achieve the wanted behavior.  With the API
-     redesign, this is no longer needed.  Full discussion can be found in
-     http://svn.haxx.se/dev/archive-2015-05/0141.shtml (Subject: "Possible
-     incompatibility of svn_repos_verify_fs2() in 1.9.0-rc1").
-     .
-     r1684940 and r1685034 contain the initial fix for this problem and the
-     test.  r1687769 is the core fix that changes svn_repos_verify_fs3() API
-     and supersedes the fix from r1684940.  r1687776 is a documentation-only
-     follow-up to r1687769.  This is a 1.9.0 blocker due to a change in the
-     unreleased API.
-   Votes:
-     +1: kotkov, rhuijben, brane
-
  * r1688273, r1688395
    Implement the new semantics of the changed svn_repos_verify_fs3 in JavaHL.
    Justification:

Modified: subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNRepos.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNRepos.cpp?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNRepos.cpp (original)
+++ subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNRepos.cpp Wed Jul  1 04:00:26 2015
@@ -594,7 +594,7 @@ SVNRepos::getRevnum(svn_revnum_t *revnum
 
 void
 SVNRepos::verify(File &path, Revision &revisionStart, Revision &revisionEnd,
-                 bool keepGoing, bool checkNormalization, bool metadataOnly,
+                 bool checkNormalization, bool metadataOnly,
                  ReposNotifyCallback *notifyCallback)
 {
   SVN::Pool requestPool;
@@ -639,13 +639,13 @@ SVNRepos::verify(File &path, Revision &r
        _("Start revision cannot be higher than end revision")), );
 
   SVN_JNI_ERR(svn_repos_verify_fs3(repos, lower, upper,
-                                   keepGoing,
                                    checkNormalization,
                                    metadataOnly,
                                    notifyCallback != NULL
                                     ? ReposNotifyCallback::notify
                                     : NULL,
                                    notifyCallback,
+                                   NULL, NULL, /* verify callback/baton */
                                    checkCancel, this /* cancel callback/baton */,
                                    requestPool.getPool()), );
 }

Modified: subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNRepos.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNRepos.h?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNRepos.h (original)
+++ subversion/branches/1.9.x/subversion/bindings/javahl/native/SVNRepos.h Wed Jul  1 04:00:26 2015
@@ -45,7 +45,7 @@ class SVNRepos : public SVNBase
   void rmlocks(File &path, StringArray &locks);
   jobject lslocks(File &path, svn_depth_t depth);
   void verify(File &path, Revision &revisionStart, Revision &revisionEnd,
-              bool keepGoing, bool checkNormalization, bool metadataOnly,
+              bool checkNormalization, bool metadataOnly,
               ReposNotifyCallback *notifyCallback);
   void setRevProp(File &path, Revision &revision,
                   const char *propName, const char *propValue,

Modified: subversion/branches/1.9.x/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp (original)
+++ subversion/branches/1.9.x/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNRepos.cpp Wed Jul  1 04:00:26 2015
@@ -419,7 +419,7 @@ JNIEXPORT void JNICALL
 Java_org_apache_subversion_javahl_SVNRepos_verify(
     JNIEnv *env, jobject jthis, jobject jpath,
     jobject jrevisionStart, jobject jrevisionEnd,
-    jboolean jkeepGoing, jboolean jcheckNormalization, jboolean jmetadataOnly,
+    jboolean jcheckNormalization, jboolean jmetadataOnly,
     jobject jcallback)
 {
   JNIEntry(SVNRepos, verify);
@@ -447,7 +447,7 @@ Java_org_apache_subversion_javahl_SVNRep
     return;
 
   cl->verify(path, revisionStart, revisionEnd,
-             jkeepGoing, jcheckNormalization, jmetadataOnly,
+             jcheckNormalization, jmetadataOnly,
              jcallback != NULL ? &callback : NULL);
 }
 

Modified: subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java (original)
+++ subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNRepos.java Wed Jul  1 04:00:26 2015
@@ -299,7 +299,6 @@ public interface ISVNRepos {
      * @param path              the path to the repository
      * @param start             the first revision
      * @param end               the last revision
-         * @param keepGoing         continue verification even if a revision is bad
          * @param checkNormalization report directory entry and mergeinfo name collisions
          *                           caused by denormalized Unicode representations
          * @param metadataOnly      check only metadata, not file contents
@@ -308,8 +307,7 @@ public interface ISVNRepos {
          * @since 1.9
      */
     public abstract void verify(File path, Revision start, Revision end,
-                boolean keepGoing, boolean checkNormalization,
-                boolean metadataOnly,
+                boolean checkNormalization, boolean metadataOnly,
                 ReposNotifyCallback callback)
             throws ClientException;
 

Modified: subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java (original)
+++ subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/ReposNotifyInformation.java Wed Jul  1 04:00:26 2015
@@ -199,12 +199,6 @@ public class ReposNotifyInformation exte
         verify_rev_structure,
 
         /**
-         * A revision is found with corruption/errors.
-         * @since 1.9
-         */
-        failure,
-
-        /**
          * A revprop shard got packed. @
          * @since 1.9
          */

Modified: subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java (original)
+++ subversion/branches/1.9.x/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNRepos.java Wed Jul  1 04:00:26 2015
@@ -238,12 +238,11 @@ public class SVNRepos implements ISVNRep
                        ReposNotifyCallback callback)
             throws ClientException
     {
-        verify(path, start, end, false, false, false, callback);
+        verify(path, start, end, false, false, callback);
     }
 
     public native void verify(File path, Revision start, Revision end,
-                              boolean keepGoing, boolean checkNormalization,
-                              boolean metadataOnly,
+                              boolean checkNormalization, boolean metadataOnly,
                               ReposNotifyCallback callback)
             throws ClientException;
 

Modified: subversion/branches/1.9.x/subversion/include/svn_error_codes.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/svn_error_codes.h?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/svn_error_codes.h (original)
+++ subversion/branches/1.9.x/subversion/include/svn_error_codes.h Wed Jul  1 04:00:26 2015
@@ -922,11 +922,6 @@ SVN_ERROR_START
              SVN_ERR_REPOS_CATEGORY_START + 10,
              "Repository upgrade is not supported")
 
-  /** @since New in 1.9. */
-  SVN_ERRDEF(SVN_ERR_REPOS_VERIFY_FAILED,
-             SVN_ERR_REPOS_CATEGORY_START + 11,
-             "Repository verification failed")
-
   /* generic RA errors */
 
   SVN_ERRDEF(SVN_ERR_RA_ILLEGAL_URL,
@@ -1497,6 +1492,11 @@ SVN_ERROR_START
              SVN_ERR_CL_CATEGORY_START + 11,
              "Failed processing one or more externals definitions")
 
+  /** @since New in 1.9. */
+  SVN_ERRDEF(SVN_ERR_CL_REPOS_VERIFY_FAILED,
+             SVN_ERR_CL_CATEGORY_START + 12,
+             "Repository verification failed")
+
   /* ra_svn errors */
 
   SVN_ERRDEF(SVN_ERR_RA_SVN_CMD_ERR,

Modified: subversion/branches/1.9.x/subversion/include/svn_repos.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/include/svn_repos.h?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/include/svn_repos.h (original)
+++ subversion/branches/1.9.x/subversion/include/svn_repos.h Wed Jul  1 04:00:26 2015
@@ -234,9 +234,6 @@ typedef enum svn_repos_notify_action_t
   /** The structure of a revision is being verified.  @since New in 1.8. */
   svn_repos_notify_verify_rev_structure,
 
-  /** A revision is found with corruption/errors. @since New in 1.9. */
-  svn_repos_notify_failure,
-
   /** A revprop shard got packed. @since New in 1.9. */
   svn_repos_notify_pack_revprops,
 
@@ -348,11 +345,6 @@ typedef struct svn_repos_notify_t
   /** For #svn_repos_notify_load_node_start, the path of the node. */
   const char *path;
 
-  /** For #svn_repos_notify_failure, this error chain indicates what
-      went wrong during verification.
-      @since New in 1.9. */
-  svn_error_t *err;
-
   /** For #svn_repos_notify_hotcopy_rev_range, the start of the copied
       revision range.
       @since New in 1.9. */
@@ -2825,6 +2817,28 @@ enum svn_repos_load_uuid
   svn_repos_load_uuid_force
 };
 
+/** Callback type for use with svn_repos_verify_fs3().  @a revision
+ * and @a verify_err are the details of a single verification failure
+ * that occurred during the svn_repos_verify_fs3() call.  @a baton is
+ * the same baton given to svn_repos_verify_fs3().  @a scratch_pool is
+ * provided for the convenience of the implementor, who should not
+ * expect it to live longer than a single callback call.
+ *
+ * @a verify_err will be cleared and becomes invalid after the callback
+ * returns, use svn_error_dup() to preserve the error.  If a callback uses
+ * @a verify_err as the return value or as a part of the return value, it
+ * should also call svn_error_dup() for @a verify_err.  Implementors of this
+ * callback are forbidden to call svn_error_clear() for @a verify_err.
+ *
+ * @see svn_repos_verify_fs3
+ *
+ * @since New in 1.9.
+ */
+typedef svn_error_t *(*svn_repos_verify_callback_t)(void *baton,
+                                                    svn_revnum_t revision,
+                                                    svn_error_t *verify_err,
+                                                    apr_pool_t *scratch_pool);
+
 /**
  * Verify the contents of the file system in @a repos.
  *
@@ -2835,9 +2849,6 @@ enum svn_repos_load_uuid
  * range, then also verify "global invariants" of the repository, as
  * described in svn_fs_verify().
  *
- * When a failure is found, if @a keep_going is @c TRUE then continue
- * verification from the next revision, otherwise stop.
- *
  * If @a check_normalization is @c TRUE, report any name collisions
  * within the same directory or svn:mergeinfo property where the names
  * differ only in character representation, but are otherwise
@@ -2848,25 +2859,31 @@ enum svn_repos_load_uuid
  * file context reconstruction and verification.  For FSFS format 7+ and
  * FSX, this allows for a very fast check against external corruption.
  *
+ * If @a verify_callback is not @c NULL, call it with @a verify_baton upon
+ * receiving an FS-specific structure failure or a revision verification
+ * failure.  Set @c revision callback argument to #SVN_INVALID_REVNUM or
+ * to the revision number respectively.  Set @c verify_err to svn_error_t
+ * describing the reason of the failure.  @c verify_err will be cleared
+ * after the callback returns, use svn_error_dup() to preserve the error.
+ * If @a verify_callback returns an error different from #SVN_NO_ERROR,
+ * stop verifying the repository and immediately return the error from
+ * @a verify_callback.
+ *
+ * If @a verify_callback is @c NULL, this function returns the first
+ * encountered verification error or #SVN_NO_ERROR if there were no failures
+ * during the verification.  Errors that prevent the verification process
+ * from continuing, such as #SVN_ERR_CANCELLED, are returned immediately
+ * and do not trigger an invocation of @a verify_callback.
+ *
  * If @a notify_func is not null, then call it with @a notify_baton and
  * with a notification structure in which the fields are set as follows.
- * (For a warning or error notification that does not apply to a specific
- * revision, the revision number is #SVN_INVALID_REVNUM.)
+ * (For a warning that does not apply to a specific revision, the revision
+ * number is #SVN_INVALID_REVNUM.)
  *
  *   For each FS-specific structure warning:
  *      @c action = svn_repos_notify_verify_rev_structure
  *      @c revision = the revision or #SVN_INVALID_REVNUM
  *
- *   For a FS-specific structure failure:
- *      @c action = #svn_repos_notify_failure
- *      @c revision = #SVN_INVALID_REVNUM
- *      @c err = the corresponding error chain
- *
- *   For each revision verification failure:
- *      @c action = #svn_repos_notify_failure
- *      @c revision = the revision
- *      @c err = the corresponding error chain
- *
  *   For each revision verification warning:
  *      @c action = #svn_repos_notify_warning
  *      @c warning and @c warning_str fields set accordingly
@@ -2888,10 +2905,7 @@ enum svn_repos_load_uuid
  *
  * Use @a scratch_pool for temporary allocation.
  *
- * Return an error if there were any failures during verification, or
- * #SVN_NO_ERROR if there were no failures.  A failure means an event that,
- * if a notification callback were provided, would send a notification
- * with @c action = #svn_repos_notify_failure.
+ * @see svn_repos_verify_callback_t
  *
  * @since New in 1.9.
  */
@@ -2899,18 +2913,20 @@ svn_error_t *
 svn_repos_verify_fs3(svn_repos_t *repos,
                      svn_revnum_t start_rev,
                      svn_revnum_t end_rev,
-                     svn_boolean_t keep_going,
                      svn_boolean_t check_normalization,
                      svn_boolean_t metadata_only,
                      svn_repos_notify_func_t notify_func,
                      void *notify_baton,
+                     svn_repos_verify_callback_t verify_callback,
+                     void *verify_baton,
                      svn_cancel_func_t cancel,
                      void *cancel_baton,
                      apr_pool_t *scratch_pool);
 
 /**
- * Like svn_repos_verify_fs3(), but with @a keep_going,
- * @a check_normalization and @a metadata_only set to @c FALSE.
+ * Like svn_repos_verify_fs3(), but with @a verify_callback and
+ * @a verify_baton set to @c NULL and with @a check_normalization
+ * and @a metadata_only set to @c FALSE.
  *
  * @since New in 1.7.
  * @deprecated Provided for backward compatibility with the 1.8 API.

Modified: subversion/branches/1.9.x/subversion/libsvn_repos/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_repos/deprecated.c?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_repos/deprecated.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_repos/deprecated.c Wed Jul  1 04:00:26 2015
@@ -774,9 +774,9 @@ svn_repos_verify_fs2(svn_repos_t *repos,
                                               end_rev,
                                               FALSE,
                                               FALSE,
-                                              FALSE,
                                               notify_func,
                                               notify_baton,
+                                              NULL, NULL,
                                               cancel_func,
                                               cancel_baton,
                                               pool));

Modified: subversion/branches/1.9.x/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/libsvn_repos/dump.c?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/1.9.x/subversion/libsvn_repos/dump.c Wed Jul  1 04:00:26 2015
@@ -2265,24 +2265,6 @@ verify_close_directory(void *dir_baton,
   return close_directory(dir_baton, pool);
 }
 
-static void
-notify_verification_error(svn_revnum_t rev,
-                          svn_error_t *err,
-                          svn_repos_notify_func_t notify_func,
-                          void *notify_baton,
-                          apr_pool_t *pool)
-{
-  svn_repos_notify_t *notify_failure;
-
-  if (notify_func == NULL)
-    return;
-
-  notify_failure = svn_repos_notify_create(svn_repos_notify_failure, pool);
-  notify_failure->err = err;
-  notify_failure->revision = rev;
-  notify_func(notify_baton, notify_failure, pool);
-}
-
 /* Verify revision REV in file system FS. */
 static svn_error_t *
 verify_one_revision(svn_fs_t *fs,
@@ -2359,15 +2341,42 @@ verify_fs_notify_func(svn_revnum_t revis
                             notify_baton->notify, pool);
 }
 
+static svn_error_t *
+report_error(svn_revnum_t revision,
+             svn_error_t *verify_err,
+             svn_repos_verify_callback_t verify_callback,
+             void *verify_baton,
+             apr_pool_t *pool)
+{
+  if (verify_callback)
+    {
+      svn_error_t *cb_err;
+
+      /* The caller provided us with a callback, so make him responsible
+         for what's going to happen with the error. */
+      cb_err = verify_callback(verify_baton, revision, verify_err, pool);
+      svn_error_clear(verify_err);
+      SVN_ERR(cb_err);
+
+      return SVN_NO_ERROR;
+    }
+  else
+    {
+      /* No callback -- no second guessing.  Just return the error. */
+      return svn_error_trace(verify_err);
+    }
+}
+
 svn_error_t *
 svn_repos_verify_fs3(svn_repos_t *repos,
                      svn_revnum_t start_rev,
                      svn_revnum_t end_rev,
-                     svn_boolean_t keep_going,
                      svn_boolean_t check_normalization,
                      svn_boolean_t metadata_only,
                      svn_repos_notify_func_t notify_func,
                      void *notify_baton,
+                     svn_repos_verify_callback_t verify_callback,
+                     void *verify_baton,
                      svn_cancel_func_t cancel_func,
                      void *cancel_baton,
                      apr_pool_t *pool)
@@ -2380,8 +2389,6 @@ svn_repos_verify_fs3(svn_repos_t *repos,
   svn_fs_progress_notify_func_t verify_notify = NULL;
   struct verify_fs_notify_func_baton_t *verify_notify_baton = NULL;
   svn_error_t *err;
-  svn_boolean_t failed_metadata = FALSE;
-  svn_revnum_t failed_revisions = 0;
 
   /* Determine the current youngest revision of the filesystem. */
   SVN_ERR(svn_fs_youngest_rev(&youngest, fs, pool));
@@ -2430,20 +2437,8 @@ 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. */
-          return svn_error_trace(err);
-        }
-      else
-        {
-          /* Clear the error and keep going. */
-          failed_metadata = TRUE;
-          svn_error_clear(err);
-        }
+      SVN_ERR(report_error(SVN_INVALID_REVNUM, err, verify_callback,
+                           verify_baton, iterpool));
     }
 
   if (!metadata_only)
@@ -2463,20 +2458,8 @@ 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. */
-                return svn_error_trace(err);
-              }
-            else
-              {
-                /* Clear the error and keep going. */
-                ++failed_revisions;
-                svn_error_clear(err);
-              }
+            SVN_ERR(report_error(rev, err, verify_callback, verify_baton,
+                                 iterpool));
           }
         else if (notify_func)
           {
@@ -2495,40 +2478,5 @@ svn_repos_verify_fs3(svn_repos_t *repos,
 
   svn_pool_destroy(iterpool);
 
-  /* Summarize the results. */
-  if (failed_metadata || 0 != failed_revisions)
-    {
-      const char *const repos_path =
-        svn_dirent_local_style(svn_repos_path(repos, pool), pool);
-
-      if (0 == failed_revisions)
-        {
-          return svn_error_createf(
-              SVN_ERR_REPOS_VERIFY_FAILED, NULL,
-              _("Metadata verification failed on repository '%s'"),
-              repos_path);
-        }
-      else
-        {
-          const char* format_string;
-
-          if (failed_metadata)
-            format_string = apr_psprintf(
-                pool, _("Verification of metadata and"
-                        " %%%s out of %%%s revisions"
-                        " failed on repository '%%s'"),
-                SVN_REVNUM_T_FMT, SVN_REVNUM_T_FMT);
-          else
-            format_string = apr_psprintf(
-                pool, _("Verification of %%%s out of %%%s revisions"
-                        " failed on repository '%%s'"),
-                SVN_REVNUM_T_FMT, SVN_REVNUM_T_FMT);
-
-          return svn_error_createf(
-              SVN_ERR_REPOS_VERIFY_FAILED, NULL, format_string,
-              failed_revisions, end_rev - start_rev + 1, repos_path);
-        }
-    }
-
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/1.9.x/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/svnadmin/svnadmin.c?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/1.9.x/subversion/svnadmin/svnadmin.c Wed Jul  1 04:00:26 2015
@@ -864,22 +864,60 @@ err_cleanup(void *data)
   return APR_SUCCESS;
 }
 
-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;
+struct repos_verify_callback_baton
+{
+  /* Should we continue after receiving a first verification error? */
+  svn_boolean_t keep_going;
 
   /* List of errors encountered during 'svnadmin verify --keep-going'. */
   apr_array_header_t *error_summary;
 
-  /* Pool for data collected during notifications. */
+  /* Pool for data collected during callback invocations. */
   apr_pool_t *result_pool;
 };
 
+/* Implementation of svn_repos_verify_callback_t to handle errors coming
+   from svn_repos_verify_fs3(). */
+static svn_error_t *
+repos_verify_callback(void *baton,
+                      svn_revnum_t revision,
+                      svn_error_t *verify_err,
+                      apr_pool_t *scratch_pool)
+{
+  struct repos_verify_callback_baton *b = baton;
+
+  if (revision == SVN_INVALID_REVNUM)
+    {
+      SVN_ERR(svn_cmdline_fputs(_("* Error verifying repository metadata.\n"),
+                                stderr, scratch_pool));
+    }
+  else
+    {
+      SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+                                  _("* Error verifying revision %ld.\n"),
+                                  revision));
+    }
+
+  if (b->keep_going)
+    {
+      struct verification_error *verr;
+
+      svn_handle_error2(verify_err, stderr, FALSE, "svnadmin: ");
+
+      /* Remember the error in B->ERROR_SUMMARY. */
+      verr = apr_palloc(b->result_pool, sizeof(*verr));
+      verr->rev = revision;
+      verr->err = svn_error_dup(verify_err);
+      apr_pool_cleanup_register(b->result_pool, verr->err, err_cleanup,
+                                apr_pool_cleanup_null);
+      APR_ARRAY_PUSH(b->error_summary, struct verification_error *) = verr;
+
+      return SVN_NO_ERROR;
+    }
+  else
+    return svn_error_trace(svn_error_dup(verify_err));
+}
+
 /* Implementation of svn_repos_notify_func_t to wrap the output to a
    response stream for svn_repos_dump_fs2(), svn_repos_verify_fs(),
    svn_repos_hotcopy3() and others. */
@@ -888,8 +926,7 @@ repos_notify_handler(void *baton,
                      const svn_repos_notify_t *notify,
                      apr_pool_t *scratch_pool)
 {
-  struct repos_notify_handler_baton *b = baton;
-  svn_stream_t *feedback_stream = b->feedback_stream;
+  svn_stream_t *feedback_stream = baton;
 
   switch (notify->action)
   {
@@ -899,32 +936,6 @@ repos_notify_handler(void *baton,
                                         notify->warning_str));
       return;
 
-    case svn_repos_notify_failure:
-      if (notify->revision != SVN_INVALID_REVNUM)
-        svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
-                                    _("* Error verifying revision %ld.\n"),
-                                    notify->revision));
-      if (notify->err)
-        {
-          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;
-
-              verr = apr_palloc(b->result_pool, sizeof(*verr));
-              verr->rev = notify->revision;
-              verr->err = svn_error_dup(notify->err);
-              apr_pool_cleanup_register(b->result_pool, verr->err, err_cleanup,
-                                        apr_pool_cleanup_null);
-              APR_ARRAY_PUSH(b->error_summary,
-                             struct verification_error *) = verr;
-            }
-        }
-      return;
-
     case svn_repos_notify_dump_rev_end:
       svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
                                         _("* Dumped revision %ld.\n"),
@@ -1172,7 +1183,7 @@ subcommand_dump(apr_getopt_t *os, void *
   svn_stream_t *stdout_stream;
   svn_revnum_t lower = SVN_INVALID_REVNUM, upper = SVN_INVALID_REVNUM;
   svn_revnum_t youngest;
-  struct repos_notify_handler_baton notify_baton = { 0 };
+  svn_stream_t *feedback_stream = NULL;
 
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
@@ -1206,12 +1217,12 @@ subcommand_dump(apr_getopt_t *os, void *
 
   /* Progress feedback goes to STDERR, unless they asked to suppress it. */
   if (! opt_state->quiet)
-    notify_baton.feedback_stream = recode_stream_create(stderr, pool);
+    feedback_stream = recode_stream_create(stderr, pool);
 
   SVN_ERR(svn_repos_dump_fs3(repos, stdout_stream, lower, upper,
                              opt_state->incremental, opt_state->use_deltas,
                              !opt_state->quiet ? repos_notify_handler : NULL,
-                             &notify_baton, check_cancel, NULL, pool));
+                             feedback_stream, check_cancel, NULL, pool));
 
   return SVN_NO_ERROR;
 }
@@ -1361,7 +1372,7 @@ subcommand_load(apr_getopt_t *os, void *
   svn_repos_t *repos;
   svn_revnum_t lower = SVN_INVALID_REVNUM, upper = SVN_INVALID_REVNUM;
   svn_stream_t *stdin_stream;
-  struct repos_notify_handler_baton notify_baton = { 0 };
+  svn_stream_t *feedback_stream = NULL;
 
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
@@ -1395,7 +1406,7 @@ subcommand_load(apr_getopt_t *os, void *
 
   /* Progress feedback goes to STDOUT, unless they asked to suppress it. */
   if (! opt_state->quiet)
-    notify_baton.feedback_stream = recode_stream_create(stdout, pool);
+    feedback_stream = recode_stream_create(stdout, pool);
 
   err = svn_repos_load_fs5(repos, stdin_stream, lower, upper,
                            opt_state->uuid_action, opt_state->parent_dir,
@@ -1404,7 +1415,7 @@ subcommand_load(apr_getopt_t *os, void *
                            !opt_state->bypass_prop_validation,
                            opt_state->ignore_dates,
                            opt_state->quiet ? NULL : repos_notify_handler,
-                           &notify_baton, check_cancel, NULL, pool);
+                           feedback_stream, check_cancel, NULL, pool);
   if (err && err->apr_err == SVN_ERR_BAD_PROPERTY_VALUE)
     return svn_error_quick_wrap(err,
                                 _("Invalid property value found in "
@@ -1451,12 +1462,12 @@ subcommand_recover(apr_getopt_t *os, voi
   svn_repos_t *repos;
   svn_error_t *err;
   struct svnadmin_opt_state *opt_state = baton;
-  struct repos_notify_handler_baton notify_baton = { 0 };
+  svn_stream_t *feedback_stream = NULL;
 
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
 
-  SVN_ERR(svn_stream_for_stdout(&notify_baton.feedback_stream, pool));
+  SVN_ERR(svn_stream_for_stdout(&feedback_stream, pool));
 
   /* Restore default signal handlers until after we have acquired the
    * exclusive lock so that the user interrupt before we actually
@@ -1464,7 +1475,7 @@ subcommand_recover(apr_getopt_t *os, voi
   setup_cancellation_signals(SIG_DFL);
 
   err = svn_repos_recover4(opt_state->repository_path, TRUE,
-                           repos_notify_handler, &notify_baton,
+                           repos_notify_handler, feedback_stream,
                            check_cancel, NULL, pool);
   if (err)
     {
@@ -1482,7 +1493,7 @@ subcommand_recover(apr_getopt_t *os, voi
                                    " another process has it open?\n")));
       SVN_ERR(svn_cmdline_fflush(stdout));
       SVN_ERR(svn_repos_recover4(opt_state->repository_path, FALSE,
-                                 repos_notify_handler, &notify_baton,
+                                 repos_notify_handler, feedback_stream,
                                  check_cancel, NULL, pool));
     }
 
@@ -1768,7 +1779,7 @@ subcommand_pack(apr_getopt_t *os, void *
 {
   struct svnadmin_opt_state *opt_state = baton;
   svn_repos_t *repos;
-  struct repos_notify_handler_baton notify_baton = { 0 };
+  svn_stream_t *feedback_stream = NULL;
 
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
@@ -1777,11 +1788,11 @@ subcommand_pack(apr_getopt_t *os, void *
 
   /* Progress feedback goes to STDOUT, unless they asked to suppress it. */
   if (! opt_state->quiet)
-    notify_baton.feedback_stream = recode_stream_create(stdout, pool);
+    feedback_stream = recode_stream_create(stdout, pool);
 
   return svn_error_trace(
     svn_repos_fs_pack2(repos, !opt_state->quiet ? repos_notify_handler : NULL,
-                       &notify_baton, check_cancel, NULL, pool));
+                       feedback_stream, check_cancel, NULL, pool));
 }
 
 
@@ -1793,8 +1804,8 @@ subcommand_verify(apr_getopt_t *os, void
   svn_repos_t *repos;
   svn_fs_t *fs;
   svn_revnum_t youngest, lower, upper;
-  struct repos_notify_handler_baton notify_baton = { 0 };
-  svn_error_t *verify_err;
+  svn_stream_t *feedback_stream = NULL;
+  struct repos_verify_callback_baton verify_baton = { 0 };
 
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
@@ -1838,28 +1849,27 @@ subcommand_verify(apr_getopt_t *os, void
       upper = lower;
     }
 
-  if (! opt_state->quiet)
-    notify_baton.feedback_stream = recode_stream_create(stdout, pool);
+  if (!opt_state->quiet)
+    feedback_stream = recode_stream_create(stdout, pool);
 
-  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;
-
-  verify_err = svn_repos_verify_fs3(repos, lower, upper,
-                                    opt_state->keep_going,
-                                    opt_state->check_normalization,
-                                    opt_state->metadata_only,
-                                    !opt_state->quiet
-                                    ? repos_notify_handler : NULL,
-                                    &notify_baton, check_cancel,
-                                    NULL, pool);
+  verify_baton.keep_going = opt_state->keep_going;
+  verify_baton.error_summary =
+    apr_array_make(pool, 0, sizeof(struct verification_error *));
+  verify_baton.result_pool = pool;
+
+  SVN_ERR(svn_repos_verify_fs3(repos, lower, upper,
+                               opt_state->check_normalization,
+                               opt_state->metadata_only,
+                               !opt_state->quiet
+                                 ? repos_notify_handler : NULL,
+                               feedback_stream,
+                               repos_verify_callback, &verify_baton,
+                               check_cancel, NULL, pool));
 
   /* Show the --keep-going error summary. */
-  if (opt_state->keep_going && notify_baton.error_summary->nelts > 0)
+  if (!opt_state->quiet
+      && opt_state->keep_going
+      && verify_baton.error_summary->nelts > 0)
     {
       int rev_maxlength;
       svn_revnum_t end_revnum;
@@ -1867,15 +1877,15 @@ subcommand_verify(apr_getopt_t *os, void
       int i;
 
       svn_error_clear(
-        svn_stream_puts(notify_baton.feedback_stream,
+        svn_stream_puts(feedback_stream,
                           _("\n-----Summary of corrupt revisions-----\n")));
 
       /* The standard column width for the revision number is 6 characters.
          If the revision number can potentially be larger (i.e. if end_revnum
          is larger than 1000000), we increase the column width as needed. */
       rev_maxlength = 6;
-      end_revnum = APR_ARRAY_IDX(notify_baton.error_summary,
-                                 notify_baton.error_summary->nelts - 1,
+      end_revnum = APR_ARRAY_IDX(verify_baton.error_summary,
+                                 verify_baton.error_summary->nelts - 1,
                                  struct verification_error *)->rev;
       while (end_revnum >= 1000000)
         {
@@ -1884,7 +1894,7 @@ subcommand_verify(apr_getopt_t *os, void
         }
 
       iterpool = svn_pool_create(pool);
-      for (i = 0; i < notify_baton.error_summary->nelts; i++)
+      for (i = 0; i < verify_baton.error_summary->nelts; i++)
         {
           struct verification_error *verr;
           svn_error_t *err;
@@ -1892,29 +1902,40 @@ subcommand_verify(apr_getopt_t *os, void
 
           svn_pool_clear(iterpool);
 
-          verr = APR_ARRAY_IDX(notify_baton.error_summary, i,
+          verr = APR_ARRAY_IDX(verify_baton.error_summary, i,
                                struct verification_error *);
-          rev_str = apr_psprintf(iterpool, "r%ld", verr->rev);
-          rev_str = apr_psprintf(iterpool, "%*s", rev_maxlength, rev_str);
-          for (err = svn_error_purge_tracing(verr->err);
-               err != SVN_NO_ERROR; err = err->child)
-            {
-              char buf[512];
-              const char *message;
 
-              message = svn_err_best_message(err, buf, sizeof(buf));
-              svn_error_clear(svn_stream_printf(notify_baton.feedback_stream,
-                                                iterpool,
-                                                "%s: E%06d: %s\n",
-                                                rev_str, err->apr_err,
-                                                message));
+          if (verr->rev != SVN_INVALID_REVNUM)
+            {
+              rev_str = apr_psprintf(iterpool, "r%ld", verr->rev);
+              rev_str = apr_psprintf(iterpool, "%*s", rev_maxlength, rev_str);
+              for (err = svn_error_purge_tracing(verr->err);
+                   err != SVN_NO_ERROR; err = err->child)
+                {
+                  char buf[512];
+                  const char *message;
+
+                  message = svn_err_best_message(err, buf, sizeof(buf));
+                  svn_error_clear(svn_stream_printf(feedback_stream, iterpool,
+                                                    "%s: E%06d: %s\n",
+                                                    rev_str, err->apr_err,
+                                                    message));
+                }
             }
         }
 
        svn_pool_destroy(iterpool);
     }
 
-  return svn_error_trace(verify_err);
+  if (verify_baton.error_summary->nelts > 0)
+    {
+      return svn_error_createf(SVN_ERR_CL_REPOS_VERIFY_FAILED, NULL,
+                               _("Failed to verify repository '%s'"),
+                               svn_dirent_local_style(
+                                 opt_state->repository_path, pool));
+    }
+
+  return SVN_NO_ERROR;
 }
 
 /* This implements `svn_opt_subcommand_t'. */
@@ -1922,7 +1943,7 @@ svn_error_t *
 subcommand_hotcopy(apr_getopt_t *os, void *baton, apr_pool_t *pool)
 {
   struct svnadmin_opt_state *opt_state = baton;
-  struct repos_notify_handler_baton notify_baton = { 0 };
+  svn_stream_t *feedback_stream = NULL;
   apr_array_header_t *targets;
   const char *new_repos_path;
 
@@ -1933,12 +1954,12 @@ subcommand_hotcopy(apr_getopt_t *os, voi
 
   /* Progress feedback goes to STDOUT, unless they asked to suppress it. */
   if (! opt_state->quiet)
-    notify_baton.feedback_stream = recode_stream_create(stdout, pool);
+    feedback_stream = recode_stream_create(stdout, pool);
 
   return svn_repos_hotcopy3(opt_state->repository_path, new_repos_path,
                             opt_state->clean_logs, opt_state->incremental,
                             !opt_state->quiet ? repos_notify_handler : NULL,
-                            &notify_baton, check_cancel, NULL, pool);
+                            feedback_stream, check_cancel, NULL, pool);
 }
 
 svn_error_t *
@@ -2322,18 +2343,18 @@ subcommand_upgrade(apr_getopt_t *os, voi
 {
   svn_error_t *err;
   struct svnadmin_opt_state *opt_state = baton;
-  struct repos_notify_handler_baton notify_baton = { 0 };
+  svn_stream_t *feedback_stream = NULL;
 
   /* Expect no more arguments. */
   SVN_ERR(parse_args(NULL, os, 0, 0, pool));
 
-  SVN_ERR(svn_stream_for_stdout(&notify_baton.feedback_stream, pool));
+  SVN_ERR(svn_stream_for_stdout(&feedback_stream, pool));
 
   /* Restore default signal handlers. */
   setup_cancellation_signals(SIG_DFL);
 
   err = svn_repos_upgrade2(opt_state->repository_path, TRUE,
-                           repos_notify_handler, &notify_baton, pool);
+                           repos_notify_handler, feedback_stream, pool);
   if (err)
     {
       if (APR_STATUS_IS_EAGAIN(err->apr_err))
@@ -2351,7 +2372,7 @@ subcommand_upgrade(apr_getopt_t *os, voi
                                        " another process has it open?\n")));
           SVN_ERR(svn_cmdline_fflush(stdout));
           SVN_ERR(svn_repos_upgrade2(opt_state->repository_path, FALSE,
-                                     repos_notify_handler, &notify_baton,
+                                     repos_notify_handler, feedback_stream,
                                      pool));
         }
       else if (err->apr_err == SVN_ERR_FS_UNSUPPORTED_UPGRADE)

Modified: subversion/branches/1.9.x/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/tests/cmdline/svnadmin_tests.py?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/1.9.x/subversion/tests/cmdline/svnadmin_tests.py Wed Jul  1 04:00:26 2015
@@ -2070,8 +2070,6 @@ def verify_keep_going(sbox):
 
   exp_out = svntest.verify.RegexListOutput([".*Verified revision 0.",
                                             ".*Verified revision 1.",
-                                            ".*Error verifying revision 2.",
-                                            ".*Error verifying revision 3.",
                                             ".*",
                                             ".*Summary.*",
                                             ".*r2: E160004:.*",
@@ -2082,8 +2080,18 @@ def verify_keep_going(sbox):
   if (svntest.main.fs_has_rep_sharing()):
     exp_out.insert(0, ".*Verifying.*metadata.*")
 
-  exp_err = svntest.verify.RegexListOutput(["svnadmin: E160004:.*",
-                                            "svnadmin: E165011:.*"], False)
+  exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.",
+                                            "svnadmin: E160004:.*",
+                                            "svnadmin: E160004:.*",
+                                            ".*Error verifying revision 3.",
+                                            "svnadmin: E160004:.*",
+                                            "svnadmin: E160004:.*",
+                                            "svnadmin: E205012:.*"], False)
+
+  if (svntest.main.is_fs_log_addressing()):
+    exp_err.insert(0, ".*Error verifying repository metadata.")
+    exp_err.insert(1, "svnadmin: E160004:.*")
+
   if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.",
                                    output, errput, exp_out, exp_err):
     raise svntest.Failure
@@ -2095,12 +2103,19 @@ def verify_keep_going(sbox):
     exp_out = svntest.verify.RegexListOutput([".*Verifying metadata at revision 0"])
   else:
     exp_out = svntest.verify.RegexListOutput([".*Verified revision 0.",
-                                             ".*Verified revision 1.",
-                                             ".*Error verifying revision 2."])
+                                              ".*Verified revision 1."])
     if (svntest.main.fs_has_rep_sharing()):
       exp_out.insert(0, ".*Verifying repository metadata.*")
 
-  exp_err = svntest.verify.RegexListOutput(["svnadmin: E160004:.*"], False)
+  if (svntest.main.is_fs_log_addressing()):
+    exp_err = svntest.verify.RegexListOutput([
+                                     ".*Error verifying repository metadata.",
+                                     "svnadmin: E160004:.*"], False)
+  else:
+    exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.",
+                                              "svnadmin: E160004:.*",
+                                              "svnadmin: E160004:.*"], False)
+
   if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.",
                                    output, errput, exp_out, exp_err):
     raise svntest.Failure
@@ -2110,13 +2125,73 @@ def verify_keep_going(sbox):
                                                         "--quiet",
                                                         sbox.repo_dir)
 
+  if (svntest.main.is_fs_log_addressing()):
+    exp_err = svntest.verify.RegexListOutput([
+                                      ".*Error verifying repository metadata.",
+                                      "svnadmin: E160004:.*"], False)
+  else:
+    exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.",
+                                              "svnadmin: E160004:.*",
+                                              "svnadmin: E160004:.*"], False)
+
   if svntest.verify.verify_outputs("Output of 'svnadmin verify' is unexpected.",
-                                   None, errput, None, "svnadmin: E160004:.*"):
+                                   None, errput, None, exp_err):
+    raise svntest.Failure
+
+  # Don't leave a corrupt repository
+  svntest.main.safe_rmtree(sbox.repo_dir, True)
+
+
+@SkipUnless(svntest.main.is_fs_type_fsfs)
+def verify_keep_going_quiet(sbox):
+  "svnadmin verify --keep-going --quiet test"
+
+  sbox.build(create_wc = False)
+  repo_url = sbox.repo_url
+  B_url = sbox.repo_url + '/B'
+  C_url = sbox.repo_url + '/C'
+
+  # Create A/B/E/bravo in r2.
+  svntest.actions.run_and_verify_svn(None, [],
+                                     'mkdir', '-m', 'log_msg',
+                                     B_url)
+
+  svntest.actions.run_and_verify_svn(None, [],
+                                     'mkdir', '-m', 'log_msg',
+                                     C_url)
+
+  r2 = fsfs_file(sbox.repo_dir, 'revs', '2')
+  fp = open(r2, 'r+b')
+  fp.write("""inserting junk to corrupt the rev""")
+  fp.close()
+
+  exit_code, output, errput = svntest.main.run_svnadmin("verify",
+                                                        "--keep-going",
+                                                        "--quiet",
+                                                        sbox.repo_dir)
+
+  exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.",
+                                            "svnadmin: E160004:.*",
+                                            "svnadmin: E160004:.*",
+                                            ".*Error verifying revision 3.",
+                                            "svnadmin: E160004:.*",
+                                            "svnadmin: E160004:.*",
+                                            "svnadmin: E205012:.*"], False)
+
+  # Insert another expected error from checksum verification
+  if (svntest.main.is_fs_log_addressing()):
+    exp_err.insert(0, ".*Error verifying repository metadata.")
+    exp_err.insert(1, "svnadmin: E160004:.*")
+
+  if svntest.verify.verify_outputs(
+          "Unexpected error while running 'svnadmin verify'.",
+          output, errput, None, exp_err):
     raise svntest.Failure
 
   # Don't leave a corrupt repository
   svntest.main.safe_rmtree(sbox.repo_dir, True)
 
+
 @SkipUnless(svntest.main.is_fs_type_fsfs)
 def verify_invalid_path_changes(sbox):
   "detect invalid changed path list entries"
@@ -2181,23 +2256,15 @@ def verify_invalid_path_changes(sbox):
 
   exp_out = svntest.verify.RegexListOutput([".*Verified revision 0.",
                                            ".*Verified revision 1.",
-                                           ".*Error verifying revision 2.",
                                            ".*Verified revision 3.",
-                                           ".*Error verifying revision 4.",
                                            ".*Verified revision 5.",
-                                           ".*Error verifying revision 6.",
                                            ".*Verified revision 7.",
                                            ".*Verified revision 8.",
                                            ".*Verified revision 9.",
-                                           ".*Error verifying revision 10.",
                                            ".*Verified revision 11.",
-                                           ".*Error verifying revision 12.",
                                            ".*Verified revision 13.",
-                                           ".*Error verifying revision 14.",
                                            ".*Verified revision 15.",
-                                           ".*Error verifying revision 16.",
                                            ".*Verified revision 17.",
-                                           ".*Error verifying revision 18.",
                                            ".*Verified revision 19.",
                                            ".*",
                                            ".*Summary.*",
@@ -2221,9 +2288,30 @@ def verify_invalid_path_changes(sbox):
     if svntest.main.is_fs_log_addressing():
       exp_out.insert(1, ".*Verifying.*metadata.*")
 
-  exp_err = svntest.verify.RegexListOutput(["svnadmin: E160020:.*",
+  exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.",
+                                            "svnadmin: E160020:.*",
+                                            "svnadmin: E160020:.*",
+                                            ".*Error verifying revision 4.",
+                                            "svnadmin: E160013:.*",
+                                            ".*Error verifying revision 6.",
+                                            "svnadmin: E160013:.*",
+                                            "svnadmin: E160013:.*",
+                                            ".*Error verifying revision 10.",
+                                            "svnadmin: E160013:.*",
+                                            "svnadmin: E160013:.*",
+                                            ".*Error verifying revision 12.",
+                                            "svnadmin: E145001:.*",
                                             "svnadmin: E145001:.*",
-                                            "svnadmin: E160013:.*"], False)
+                                            ".*Error verifying revision 14.",
+                                            "svnadmin: E160013:.*",
+                                            "svnadmin: E160013:.*",
+                                            ".*Error verifying revision 16.",
+                                            "svnadmin: E145001:.*",
+                                            "svnadmin: E145001:.*",
+                                            ".*Error verifying revision 18.",
+                                            "svnadmin: E160013:.*",
+                                            "svnadmin: E160013:.*",
+                                            "svnadmin: E205012:.*"], False)
 
 
   if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.",
@@ -2234,9 +2322,10 @@ def verify_invalid_path_changes(sbox):
                                                         sbox.repo_dir)
 
   exp_out = svntest.verify.RegexListOutput([".*Verified revision 0.",
-                                            ".*Verified revision 1.",
-                                            ".*Error verifying revision 2."])
-  exp_err = svntest.verify.RegexListOutput(["svnadmin: E160020:.*"], False)
+                                            ".*Verified revision 1."])
+  exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.",
+                                            "svnadmin: E160020:.*",
+                                            "svnadmin: E160020:.*"], False)
 
   if (svntest.main.fs_has_rep_sharing()):
     exp_out.insert(0, ".*Verifying.*metadata.*")
@@ -2251,8 +2340,13 @@ def verify_invalid_path_changes(sbox):
                                                         "--quiet",
                                                         sbox.repo_dir)
 
+  exp_out = []
+  exp_err = svntest.verify.RegexListOutput([".*Error verifying revision 2.",
+                                            "svnadmin: E160020:.*",
+                                            "svnadmin: E160020:.*"], False)
+
   if svntest.verify.verify_outputs("Output of 'svnadmin verify' is unexpected.",
-                                   None, errput, None, "svnadmin: E160020:.*"):
+                                   output, errput, exp_out, exp_err):
     raise svntest.Failure
 
   # Don't leave a corrupt repository
@@ -3010,6 +3104,7 @@ test_list = [ None,
               mergeinfo_race,
               recover_old_empty,
               verify_keep_going,
+              verify_keep_going_quiet,
               verify_invalid_path_changes,
               verify_denormalized_names,
               fsfs_recover_old_non_empty,

Modified: subversion/branches/1.9.x/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c (original)
+++ subversion/branches/1.9.x/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c Wed Jul  1 04:00:26 2015
@@ -117,8 +117,9 @@ fuzzing_1_byte_1_rev(const char *repo_na
       svn_fs_set_warning_func(svn_repos_fs(repos), dont_filter_warnings, NULL);
 
       /* This shall detect the corruption and return an error. */
-      err = svn_repos_verify_fs3(repos, revision, revision, TRUE, FALSE, FALSE,
-                                 NULL, NULL, NULL, NULL, iterpool);
+      err = svn_repos_verify_fs3(repos, revision, revision, FALSE, FALSE,
+                                 NULL, NULL, NULL, NULL, NULL, NULL,
+                                 iterpool);
 
       /* Case-only changes in checksum digests are not an error.
        * We allow upper case chars to be used in MD5 checksums in all other

Modified: subversion/branches/1.9.x/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c?rev=1688547&r1=1688546&r2=1688547&view=diff
==============================================================================
--- subversion/branches/1.9.x/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c (original)
+++ subversion/branches/1.9.x/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c Wed Jul  1 04:00:26 2015
@@ -361,9 +361,10 @@ receive_index(const svn_fs_fs__p2l_entry
   return SVN_NO_ERROR;
 }
 
+#define REPO_NAME "test-repo-load-index-test"
+
 static svn_error_t *
-load_index_test(const svn_test_opts_t *opts, apr_pool_t *pool,
-                const char *repo_name, svn_boolean_t keep_going)
+load_index(const svn_test_opts_t *opts, apr_pool_t *pool)
 {
   svn_repos_t *repos;
   svn_revnum_t rev;
@@ -381,7 +382,7 @@ load_index_test(const svn_test_opts_t *o
                             "pre-1.9 SVN doesn't have FSFS indexes");
 
   /* Create a filesystem */
-  SVN_ERR(create_greek_repo(&repos, &rev, opts, repo_name, pool, pool));
+  SVN_ERR(create_greek_repo(&repos, &rev, opts, REPO_NAME, pool, pool));
 
   /* Read the original index contents for REV in ENTRIES. */
   SVN_ERR(svn_fs_fs__dump_index(svn_repos_fs(repos), rev, receive_index,
@@ -397,34 +398,21 @@ load_index_test(const svn_test_opts_t *o
   APR_ARRAY_PUSH(alt_entries, svn_fs_fs__p2l_entry_t *) = &entry;
 
   SVN_ERR(svn_fs_fs__load_index(svn_repos_fs(repos), rev, alt_entries, pool));
-  SVN_TEST_ASSERT_ERROR(svn_repos_verify_fs3(repos, rev, rev,
-                                             keep_going, FALSE, FALSE,
-                                             NULL, NULL, NULL, NULL, pool),
-                        (keep_going
-                         ? SVN_ERR_REPOS_VERIFY_FAILED
-                         : SVN_ERR_FS_INDEX_CORRUPTION));
+  SVN_TEST_ASSERT_ERROR(svn_repos_verify_fs3(repos, rev, rev, FALSE, FALSE,
+                                             NULL, NULL, NULL, NULL, NULL,
+                                             NULL, pool),
+                        SVN_ERR_FS_INDEX_CORRUPTION);
 
   /* Restore the original index. */
   SVN_ERR(svn_fs_fs__load_index(svn_repos_fs(repos), rev, entries, pool));
-  SVN_ERR(svn_repos_verify_fs3(repos, rev, rev, keep_going, FALSE, FALSE,
+  SVN_ERR(svn_repos_verify_fs3(repos, rev, rev, FALSE, FALSE, NULL, NULL,
                                NULL, NULL, NULL, NULL, pool));
 
   return SVN_NO_ERROR;
 }
 
-static svn_error_t *
-load_index(const svn_test_opts_t *opts,
-           apr_pool_t *pool)
-{
-  return load_index_test(opts, pool, "test-repo-load-index-test", FALSE);
-}
+#undef REPO_NAME
 
-static svn_error_t *
-load_index_keep_going(const svn_test_opts_t *opts,
-                      apr_pool_t *pool)
-{
-  return load_index_test(opts, pool, "test-repo-load-index-full-test", TRUE);
-}
 
 
 /* The test table.  */
@@ -440,8 +428,6 @@ static struct svn_test_descriptor_t test
                        "dump the P2L index"),
     SVN_TEST_OPTS_PASS(load_index,
                        "load the P2L index"),
-    SVN_TEST_OPTS_PASS(load_index_keep_going,
-                       "load the P2L index (full verification)"),
     SVN_TEST_NULL
   };