subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1694500 [6/7] - in /subversion/branches/fsx-1.10: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ subversion/bindings/ctypes-python/csvn/ext/ subversion/bindings/javahl/native/ subversion/bindings/javahl/src/org/apac...
Date Thu, 06 Aug 2015 14:01:40 GMT
Modified: subversion/branches/fsx-1.10/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/svnadmin/svnadmin.c?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/fsx-1.10/subversion/svnadmin/svnadmin.c Thu Aug  6 14:01:38 2015
@@ -166,11 +166,13 @@ static svn_opt_subcommand_t
   subcommand_delrevprop,
   subcommand_deltify,
   subcommand_dump,
+  subcommand_dump_revprops,
   subcommand_freeze,
   subcommand_help,
   subcommand_hotcopy,
   subcommand_info,
   subcommand_load,
+  subcommand_load_revprops,
   subcommand_list_dblogs,
   subcommand_list_unused_dblogs,
   subcommand_lock,
@@ -392,6 +394,15 @@ static const svn_opt_subcommand_desc2_t
     "changed in those revisions.)\n"),
   {'r', svnadmin__incremental, svnadmin__deltas, 'q', 'M'} },
 
+  {"dump-revprops", subcommand_dump_revprops, {0}, N_
+   ("usage: svnadmin dump-revprops REPOS_PATH [-r LOWER[:UPPER]]\n\n"
+    "Dump the revision properties of filesystem to stdout in a 'dumpfile'\n"
+    "portable format, sending feedback to stderr.  Dump revisions\n"
+    "LOWER rev through UPPER rev.  If no revisions are given, dump the\n"
+    "properties for all revisions.  If only LOWER is given, dump the\n"
+    "properties for that one revision.\n"),
+  {'r', 'q'} },
+
   {"freeze", subcommand_freeze, {0}, N_
    ("usage: 1. svnadmin freeze REPOS_PATH PROGRAM [ARG...]\n"
     "               2. svnadmin freeze -F FILE PROGRAM [ARG...]\n\n"
@@ -444,6 +455,15 @@ static const svn_opt_subcommand_desc2_t
     svnadmin__use_pre_commit_hook, svnadmin__use_post_commit_hook,
     svnadmin__parent_dir, svnadmin__bypass_prop_validation, 'M'} },
 
+  {"load-revprops", subcommand_load_revprops, {0}, N_
+   ("usage: svnadmin load-revprops REPOS_PATH\n\n"
+    "Read a 'dumpfile'-formatted stream from stdin, setting the revision\n"
+    "properties in the repository's filesystem.  Revisions not found in the\n"
+    "repository will cause an error.  Progress feedback is sent to stdout.\n"
+    "If --revision is specified, limit the loaded revisions to only those\n"
+    "in the dump stream whose revision numbers match the specified range.\n"),
+   {'q', 'r', svnadmin__force_uuid, svnadmin__bypass_prop_validation} },
+
   {"lock", subcommand_lock, {0}, N_
    ("usage: svnadmin lock REPOS_PATH PATH USERNAME COMMENT-FILE [TOKEN]\n\n"
     "Lock PATH by USERNAME setting comments from COMMENT-FILE.\n"
@@ -864,25 +884,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;
-
-  /* Suppress notifications that are neither errors nor warnings. */
-  svn_boolean_t silent_running;
-
-  /* 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. */
@@ -891,16 +946,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;
-
-  /* Don't print anything if the feedback stream isn't provided.
-     Only print errors and warnings in silent mode. */
-  if (!feedback_stream
-      || (b->silent_running
-          && notify->action != svn_repos_notify_warning
-          && notify->action != svn_repos_notify_failure))
-    return;
+  svn_stream_t *feedback_stream = baton;
 
   switch (notify->action)
   {
@@ -910,32 +956,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"),
@@ -1126,6 +1146,24 @@ repos_notify_handler(void *baton,
                                _("* Copied revisions from %ld to %ld.\n"),
                                notify->start_revision, notify->end_revision));
         }
+      return;
+
+    case svn_repos_notify_pack_noop:
+      /* For best backward compatibility, we keep silent if there were just
+         no more shards to pack. */
+      if (notify->shard == -1)
+        {
+          svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                     _("svnadmin: Warning - this repository is not sharded."
+                       " Packing has no effect.\n")));
+        }
+      return;
+
+    case svn_repos_notify_load_revprop_set:
+      svn_error_clear(svn_stream_printf(feedback_stream, scratch_pool,
+                        _("Properties set on revision %ld.\n"),
+                        notify->new_revision));
+      return;
 
     default:
       return;
@@ -1172,57 +1210,106 @@ recode_stream_create(FILE *std_stream, a
   return rw_stream;
 }
 
-
-/* This implements `svn_opt_subcommand_t'. */
-static svn_error_t *
-subcommand_dump(apr_getopt_t *os, void *baton, apr_pool_t *pool)
+/* Read the min / max revision from the OPT_STATE, verify them against REPOS
+   and return them in *LOWER and *UPPER, respectively.  Use SCRATCH_POOL
+   for temporary allocations. */
+static svn_error_t *
+get_dump_range(svn_revnum_t *lower,
+               svn_revnum_t *upper,
+               svn_repos_t *repos,
+               struct svnadmin_opt_state *opt_state,
+               apr_pool_t *scratch_pool)
 {
-  struct svnadmin_opt_state *opt_state = baton;
-  svn_repos_t *repos;
   svn_fs_t *fs;
-  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 };
 
-  /* Expect no more arguments. */
-  SVN_ERR(parse_args(NULL, os, 0, 0, pool));
+  *lower = SVN_INVALID_REVNUM;
+  *upper = SVN_INVALID_REVNUM;
 
-  SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));
   fs = svn_repos_fs(repos);
-  SVN_ERR(svn_fs_youngest_rev(&youngest, fs, pool));
+  SVN_ERR(svn_fs_youngest_rev(&youngest, fs, scratch_pool));
 
   /* Find the revision numbers at which to start and end. */
-  SVN_ERR(get_revnum(&lower, &opt_state->start_revision,
-                     youngest, repos, pool));
-  SVN_ERR(get_revnum(&upper, &opt_state->end_revision,
-                     youngest, repos, pool));
+  SVN_ERR(get_revnum(lower, &opt_state->start_revision,
+                     youngest, repos, scratch_pool));
+  SVN_ERR(get_revnum(upper, &opt_state->end_revision,
+                     youngest, repos, scratch_pool));
 
   /* Fill in implied revisions if necessary. */
-  if (lower == SVN_INVALID_REVNUM)
+  if (*lower == SVN_INVALID_REVNUM)
     {
-      lower = 0;
-      upper = youngest;
+      *lower = 0;
+      *upper = youngest;
     }
-  else if (upper == SVN_INVALID_REVNUM)
+  else if (*upper == SVN_INVALID_REVNUM)
     {
-      upper = lower;
+      *upper = *lower;
     }
 
-  if (lower > upper)
+  if (*lower > *upper)
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
        _("First revision cannot be higher than second"));
 
+  return SVN_NO_ERROR;
+}
+
+/* This implements `svn_opt_subcommand_t'. */
+static svn_error_t *
+subcommand_dump(apr_getopt_t *os, void *baton, apr_pool_t *pool)
+{
+  struct svnadmin_opt_state *opt_state = baton;
+  svn_repos_t *repos;
+  svn_stream_t *stdout_stream;
+  svn_revnum_t lower, upper;
+  svn_stream_t *feedback_stream = NULL;
+
+  /* Expect no more arguments. */
+  SVN_ERR(parse_args(NULL, os, 0, 0, pool));
+
+  SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));
+  SVN_ERR(get_dump_range(&lower, &upper, repos, opt_state, pool));
+
   SVN_ERR(svn_stream_for_stdout(&stdout_stream, pool));
 
   /* 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,
+  SVN_ERR(svn_repos_dump_fs4(repos, stdout_stream, lower, upper,
                              opt_state->incremental, opt_state->use_deltas,
+                             TRUE, TRUE,
                              !opt_state->quiet ? repos_notify_handler : NULL,
-                             &notify_baton, check_cancel, NULL, pool));
+                             feedback_stream, check_cancel, NULL, pool));
+
+  return SVN_NO_ERROR;
+}
+
+/* This implements `svn_opt_subcommand_t'. */
+static svn_error_t *
+subcommand_dump_revprops(apr_getopt_t *os, void *baton, apr_pool_t *pool)
+{
+  struct svnadmin_opt_state *opt_state = baton;
+  svn_repos_t *repos;
+  svn_stream_t *stdout_stream;
+  svn_revnum_t lower, upper;
+  svn_stream_t *feedback_stream = NULL;
+
+  /* Expect no more arguments. */
+  SVN_ERR(parse_args(NULL, os, 0, 0, pool));
+
+  SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));
+  SVN_ERR(get_dump_range(&lower, &upper, repos, opt_state, pool));
+
+  SVN_ERR(svn_stream_for_stdout(&stdout_stream, pool));
+
+  /* Progress feedback goes to STDERR, unless they asked to suppress it. */
+  if (! opt_state->quiet)
+    feedback_stream = recode_stream_create(stderr, pool);
+
+  SVN_ERR(svn_repos_dump_fs4(repos, stdout_stream, lower, upper,
+                             FALSE, FALSE, TRUE, FALSE,
+                             !opt_state->quiet ? repos_notify_handler : NULL,
+                             feedback_stream, check_cancel, NULL, pool));
 
   return SVN_NO_ERROR;
 }
@@ -1362,43 +1449,57 @@ optrev_to_revnum(svn_revnum_t *revnum, c
   return SVN_NO_ERROR;
 }
 
-
-/* This implements `svn_opt_subcommand_t'. */
+/* Read the min / max revision from the OPT_STATE, verify them and return
+   them in *LOWER and *UPPER, respectively. */
 static svn_error_t *
-subcommand_load(apr_getopt_t *os, void *baton, apr_pool_t *pool)
+get_load_range(svn_revnum_t *lower,
+               svn_revnum_t *upper,
+               struct svnadmin_opt_state *opt_state)
 {
-  svn_error_t *err;
-  struct svnadmin_opt_state *opt_state = baton;
-  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 };
-
-  /* Expect no more arguments. */
-  SVN_ERR(parse_args(NULL, os, 0, 0, pool));
-
   /* Find the revision numbers at which to start and end.  We only
      support a limited set of revision kinds: number and unspecified. */
-  SVN_ERR(optrev_to_revnum(&lower, &opt_state->start_revision));
-  SVN_ERR(optrev_to_revnum(&upper, &opt_state->end_revision));
+  SVN_ERR(optrev_to_revnum(lower, &opt_state->start_revision));
+  SVN_ERR(optrev_to_revnum(upper, &opt_state->end_revision));
 
   /* Fill in implied revisions if necessary. */
-  if ((upper == SVN_INVALID_REVNUM) && (lower != SVN_INVALID_REVNUM))
+  if ((*upper == SVN_INVALID_REVNUM) && (*lower != SVN_INVALID_REVNUM))
     {
-      upper = lower;
+      *upper = *lower;
     }
-  else if ((upper != SVN_INVALID_REVNUM) && (lower == SVN_INVALID_REVNUM))
+  else if ((*upper != SVN_INVALID_REVNUM) && (*lower == SVN_INVALID_REVNUM))
     {
-      lower = upper;
+      *lower = *upper;
     }
 
   /* Ensure correct range ordering. */
-  if (lower > upper)
+  if (*lower > *upper)
     {
       return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                               _("First revision cannot be higher than second"));
     }
 
+  return SVN_NO_ERROR;
+}
+
+
+/* This implements `svn_opt_subcommand_t'. */
+static svn_error_t *
+subcommand_load(apr_getopt_t *os, void *baton, apr_pool_t *pool)
+{
+  svn_error_t *err;
+  struct svnadmin_opt_state *opt_state = baton;
+  svn_repos_t *repos;
+  svn_revnum_t lower, upper;
+  svn_stream_t *stdin_stream;
+  svn_stream_t *feedback_stream = NULL;
+
+  /* Expect no more arguments. */
+  SVN_ERR(parse_args(NULL, os, 0, 0, pool));
+
+  /* Find the revision numbers at which to start and end.  We only
+     support a limited set of revision kinds: number and unspecified. */
+  SVN_ERR(get_load_range(&lower, &upper, opt_state));
+
   SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));
 
   /* Read the stream from STDIN.  Users can redirect a file. */
@@ -1406,7 +1507,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,
@@ -1415,7 +1516,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 "
@@ -1425,6 +1526,47 @@ subcommand_load(apr_getopt_t *os, void *
   return err;
 }
 
+static svn_error_t *
+subcommand_load_revprops(apr_getopt_t *os, void *baton, apr_pool_t *pool)
+{
+  svn_error_t *err;
+  struct svnadmin_opt_state *opt_state = baton;
+  svn_repos_t *repos;
+  svn_revnum_t lower, upper;
+  svn_stream_t *stdin_stream;
+
+  svn_stream_t *feedback_stream = NULL;
+
+  /* Expect no more arguments. */
+  SVN_ERR(parse_args(NULL, os, 0, 0, pool));
+
+  /* Find the revision numbers at which to start and end.  We only
+     support a limited set of revision kinds: number and unspecified. */
+  SVN_ERR(get_load_range(&lower, &upper, opt_state));
+
+  SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));
+
+  /* Read the stream from STDIN.  Users can redirect a file. */
+  SVN_ERR(svn_stream_for_stdin(&stdin_stream, pool));
+
+  /* Progress feedback goes to STDOUT, unless they asked to suppress it. */
+  if (! opt_state->quiet)
+    feedback_stream = recode_stream_create(stdout, pool);
+
+  err = svn_repos_load_fs_revprops(repos, stdin_stream, lower, upper,
+                                   !opt_state->bypass_prop_validation,
+                                   opt_state->ignore_dates,
+                                   opt_state->quiet ? NULL
+                                                    : repos_notify_handler,
+                                   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 "
+                                  "dumpstream; consider repairing the source "
+                                  "or using --bypass-prop-validation while "
+                                  "loading."));
+  return err;
+}
 
 /* This implements `svn_opt_subcommand_t'. */
 static svn_error_t *
@@ -1462,12 +1604,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
@@ -1475,7 +1617,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)
     {
@@ -1493,7 +1635,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));
     }
 
@@ -1779,7 +1921,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));
@@ -1788,11 +1930,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));
 }
 
 
@@ -1804,10 +1946,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 };
-  struct repos_notify_handler_baton *notify_baton_p = &notify_baton;
-  svn_repos_notify_func_t notify_func = repos_notify_handler;
-  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));
@@ -1851,42 +1991,27 @@ subcommand_verify(apr_getopt_t *os, void
       upper = lower;
     }
 
-  /* Set up the notification handler. */
-  if (!opt_state->quiet || opt_state->keep_going)
-    {
-      if (opt_state->quiet)
-        {
-          notify_baton.silent_running = TRUE;
-          notify_baton.feedback_stream = recode_stream_create(stderr, pool);
-        }
-      else
-        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;
-    }
-  else
-    {
-      notify_func = NULL;
-      notify_baton_p = NULL;
-    }
-
-  verify_err = svn_repos_verify_fs3(repos, lower, upper,
-                                    opt_state->keep_going,
-                                    opt_state->check_normalization,
-                                    opt_state->metadata_only,
-                                    notify_func, notify_baton_p,
-                                    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->quiet
       && opt_state->keep_going
-      && notify_baton.error_summary->nelts > 0)
+      && verify_baton.error_summary->nelts > 0)
     {
       int rev_maxlength;
       svn_revnum_t end_revnum;
@@ -1894,15 +2019,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)
         {
@@ -1911,7 +2036,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;
@@ -1919,29 +2044,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'. */
@@ -1949,7 +2085,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;
 
@@ -1960,12 +2096,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 *
@@ -2349,18 +2485,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))
@@ -2378,7 +2514,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/fsx-1.10/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/svnserve/svnserve.c?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/svnserve/svnserve.c (original)
+++ subversion/branches/fsx-1.10/subversion/svnserve/svnserve.c Thu Aug  6 14:01:38 2015
@@ -211,6 +211,17 @@ void winservice_notify_stop(void)
 #define SVNSERVE_OPT_MAX_THREADS     272
 #define SVNSERVE_OPT_BLOCK_READ      273
 
+/* Text macro because we can't use #ifdef sections inside a N_("...")
+   macro expansion. */
+#ifdef CONNECTION_HAVE_THREAD_OPTION
+#define ONLY_AVAILABLE_WITH_THEADS \
+        "\n" \
+        "                             "\
+        "[used only with --threads]"
+#else
+#define ONLY_AVAILABLE_WITH_THEADS ""
+#endif
+
 static const apr_getopt_option_t svnserve__options[] =
   {
     {"daemon",           'd', 0, N_("daemon mode")},
@@ -317,33 +328,22 @@ static const apr_getopt_option_t svnserv
      * ### this option never exists when --service exists. */
     {"threads",          'T', 0, N_("use threads instead of fork "
                                     "[mode: daemon]")},
+#endif
+#ifdef APR_HAS_THREADS
     {"min-threads",      SVNSERVE_OPT_MIN_THREADS, 1,
      N_("Minimum number of server threads, even if idle.\n"
         "                             "
-        "Caped to max-threads; minimum value is 0.\n"
-        "                             "
-        "Default is 1.\n"
+        "Capped to max-threads; minimum value is 0.\n"
         "                             "
-        "[used only with --threads]")},
-#if (APR_SIZEOF_VOIDP <= 4)
+        "Default is 1."
+        ONLY_AVAILABLE_WITH_THEADS)},
     {"max-threads",      SVNSERVE_OPT_MAX_THREADS, 1,
      N_("Maximum number of server threads, even if there\n"
         "                             "
         "are more connections.  Minimum value is 1.\n"
         "                             "
-        "Default is 64.\n"
-        "                             "
-        "[used only with --threads]")},
-#else
-    {"max-threads",      SVNSERVE_OPT_MAX_THREADS, 1,
-     N_("Maximum number of server threads, even if there\n"
-        "                             "
-        "are more connections.  Minimum value is 1.\n"
-        "                             "
-        "Default is 256.\n"
-        "                             "
-        "[used only with --threads]")},
-#endif
+        "Default is " APR_STRINGIFY(THREADPOOL_MAX_SIZE) "."
+        ONLY_AVAILABLE_WITH_THEADS)},
 #endif
     {"foreground",        SVNSERVE_OPT_FOREGROUND, 0,
      N_("run in foreground (useful for debugging)\n"

Modified: subversion/branches/fsx-1.10/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/svnsync/svnsync.c?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/svnsync/svnsync.c (original)
+++ subversion/branches/fsx-1.10/subversion/svnsync/svnsync.c Thu Aug  6 14:01:38 2015
@@ -71,6 +71,7 @@ enum svnsync__opt {
   svnsync_opt_trust_server_cert_failures_src,
   svnsync_opt_trust_server_cert_failures_dst,
   svnsync_opt_allow_non_empty,
+  svnsync_opt_skip_unchanged,
   svnsync_opt_steal_lock
 };
 
@@ -148,9 +149,14 @@ static const svn_opt_subcommand_desc2_t
          "if untrusted users/administrators may have write access to the\n"
          "DEST_URL repository.\n"
          "\n"
+         "Unless you need to trigger the destination repositoy's revprop\n"
+         "change hooks for all revision properties, it is recommended to use\n"
+         "the --skip-unchanged option for best performance.\n"
+         "\n"
          "Form 2 is deprecated syntax, equivalent to specifying \"-rREV[:REV2]\".\n"),
       { SVNSYNC_OPTS_DEFAULT, svnsync_opt_source_prop_encoding, 'q', 'r',
-        svnsync_opt_disable_locking, svnsync_opt_steal_lock, 'M' } },
+        svnsync_opt_disable_locking, svnsync_opt_steal_lock,
+        svnsync_opt_skip_unchanged, 'M' } },
     { "info", info_cmd, { 0 },
       N_("usage: svnsync info DEST_URL\n"
          "\n"
@@ -179,6 +185,8 @@ static const apr_getopt_option_t svnsync
                           "    'HEAD'       latest in repository") },
     {"allow-non-empty", svnsync_opt_allow_non_empty, 0,
                        N_("allow a non-empty destination repository") },
+    {"skip-unchanged", svnsync_opt_skip_unchanged, 0,
+                       N_("don't copy unchanged revision properties") },
     {"non-interactive", svnsync_opt_non_interactive, 0,
                        N_("do no interactive prompting (default is to prompt\n"
                           "                             "
@@ -303,6 +311,7 @@ typedef struct opt_baton_t {
   svn_boolean_t steal_lock;
   svn_boolean_t quiet;
   svn_boolean_t allow_non_empty;
+  svn_boolean_t skip_unchanged;
   svn_boolean_t version;
   svn_boolean_t help;
   svn_opt_revision_t start_rev;
@@ -422,6 +431,7 @@ typedef struct subcommand_baton_t {
   svn_ra_callbacks2_t sync_callbacks;
   svn_boolean_t quiet;
   svn_boolean_t allow_non_empty;
+  svn_boolean_t skip_unchanged; /* Enable optimization for revprop changes. */
   const char *to_url;
 
   /* initialize, synchronize, and copy-revprops only */
@@ -592,6 +602,10 @@ filter_props(int *filtered_count, apr_ha
  * and set *FILTERED_COUNT to the number of properties thus omitted.
  * REV_PROPS is a hash mapping (char *)propname to (svn_string_t *)propval.
  *
+ * If OLD_REV_PROPS is not NULL, skip all properties that did not change.
+ * Note that this implies that hook scripts won't be triggered anymore for
+ * those revprops that did not change.
+ *
  * All allocations will be done in a subpool of POOL.
  */
 static svn_error_t *
@@ -599,6 +613,7 @@ write_revprops(int *filtered_count,
                svn_ra_session_t *session,
                svn_revnum_t rev,
                apr_hash_t *rev_props,
+               apr_hash_t *old_rev_props,
                apr_pool_t *pool)
 {
   apr_pool_t *subpool = svn_pool_create(pool);
@@ -616,6 +631,17 @@ write_revprops(int *filtered_count,
       if (strncmp(propname, SVNSYNC_PROP_PREFIX,
                   sizeof(SVNSYNC_PROP_PREFIX) - 1) != 0)
         {
+          if (old_rev_props)
+            {
+              /* Skip the RA call for any no-op propset. */
+              const svn_string_t *old_value = svn_hash_gets(old_rev_props,
+                                                            propname);
+              if ((!old_value && !propval)
+                  || (old_value && propval
+                      && svn_string_compare(old_value, propval)))
+                continue;
+            }
+
           SVN_ERR(svn_ra_change_rev_prop2(session, rev, propname, NULL,
                                           propval, subpool));
         }
@@ -677,6 +703,10 @@ log_properties_normalized(int normalized
  * If SYNC is TRUE, then properties on the destination revision that
  * do not exist on the source revision will be removed.
  *
+ * If SKIP_UNCHANGED is TRUE, skip any no-op revprop changes. This also
+ * prevents hook scripts from firing for those unchanged revprops.  Has
+ * no effect if SYNC is FALSE.
+ *
  * If QUIET is FALSE, then log_properties_copied() is called to log that
  * properties were copied for revision REV.
  *
@@ -689,6 +719,7 @@ copy_revprops(svn_ra_session_t *from_ses
               svn_ra_session_t *to_session,
               svn_revnum_t rev,
               svn_boolean_t sync,
+              svn_boolean_t skip_unchanged,
               svn_boolean_t quiet,
               const char *source_prop_encoding,
               int *normalized_count,
@@ -714,7 +745,8 @@ copy_revprops(svn_ra_session_t *from_ses
                                      source_prop_encoding, pool));
 
   /* Copy all but the svn:svnsync properties. */
-  SVN_ERR(write_revprops(&filtered_count, to_session, rev, rev_props, pool));
+  SVN_ERR(write_revprops(&filtered_count, to_session, rev, rev_props,
+                         skip_unchanged ? existing_props : NULL, pool));
 
   /* Delete those properties that were in TARGET but not in SOURCE */
   if (sync)
@@ -750,6 +782,7 @@ make_subcommand_baton(opt_baton_t *opt_b
   b->sync_callbacks.open_tmp_file = open_tmp_file;
   b->sync_callbacks.auth_baton = opt_baton->sync_auth_baton;
   b->quiet = opt_baton->quiet;
+  b->skip_unchanged = opt_baton->skip_unchanged;
   b->allow_non_empty = opt_baton->allow_non_empty;
   b->to_url = to_url;
   b->source_prop_encoding = opt_baton->source_prop_encoding;
@@ -859,9 +892,9 @@ do_initialize(svn_ra_session_t *to_sessi
      LATEST is not 0, this really serves merely aesthetic and
      informational purposes, keeping the output of this command
      consistent while allowing folks to see what the latest revision is.  */
-  SVN_ERR(copy_revprops(from_session, to_session, latest, FALSE, baton->quiet,
-                        baton->source_prop_encoding, &normalized_rev_props_count,
-                        pool));
+  SVN_ERR(copy_revprops(from_session, to_session, latest, FALSE, FALSE,
+                        baton->quiet, baton->source_prop_encoding,
+                        &normalized_rev_props_count, pool));
 
   SVN_ERR(log_properties_normalized(normalized_rev_props_count, 0, pool));
 
@@ -1372,7 +1405,7 @@ replay_rev_finished(svn_revnum_t revisio
   rb->normalized_rev_props_count += normalized_count;
 
   SVN_ERR(write_revprops(&filtered_count, rb->to_session, revision, filtered,
-                         subpool));
+                         NULL, subpool));
 
   /* Remove all extra properties in TARGET. */
   SVN_ERR(remove_props_not_in_source(rb->to_session, revision,
@@ -1478,7 +1511,8 @@ do_synchronize(svn_ra_session_t *to_sess
           if (copying > last_merged)
             {
               SVN_ERR(copy_revprops(from_session, to_session, to_latest, TRUE,
-                                    baton->quiet, baton->source_prop_encoding,
+                                    baton->skip_unchanged, baton->quiet,
+                                    baton->source_prop_encoding,
                                     &normalized_rev_props_count, pool));
               last_merged = copying;
               last_merged_rev = svn_string_create
@@ -1649,7 +1683,8 @@ do_copy_revprops(svn_ra_session_t *to_se
     {
       int normalized_count;
       SVN_ERR(check_cancel(NULL));
-      SVN_ERR(copy_revprops(from_session, to_session, i, TRUE, baton->quiet,
+      SVN_ERR(copy_revprops(from_session, to_session, i, TRUE,
+                            baton->skip_unchanged, baton->quiet,
                             baton->source_prop_encoding, &normalized_count,
                             pool));
       normalized_rev_props_count += normalized_count;
@@ -2108,6 +2143,10 @@ sub_main(int *exit_code, int argc, const
             opt_baton.allow_non_empty = TRUE;
             break;
 
+          case svnsync_opt_skip_unchanged:
+            opt_baton.skip_unchanged = TRUE;
+            break;
+
           case 'q':
             opt_baton.quiet = TRUE;
             break;

Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/README
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/README?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/cmdline/README (original)
+++ subversion/branches/fsx-1.10/subversion/tests/cmdline/README Thu Aug  6 14:01:38 2015
@@ -12,7 +12,7 @@ command-line client.  It has no access t
 looks inside the .svn/ directory; it only performs actions that a
 human user would do.
 
-These tests require Python 2.5 or later.
+These tests require Python 2.7 or later.
 
   [ For more general information on Subversion's testing system,
     please read the README in subversion/tests/. ]
@@ -83,6 +83,133 @@ paths adjusted appropriately:
      Require valid-user
    </Location>
 
+   <Location /authz-test-work/anon>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     # This may seem unnecessary but granting access to everyone here is necessary
+     # to exercise a bug with httpd 2.3.x+.  The "Require all granted" syntax is
+     # new to 2.3.x+ which we can detect with the mod_authz_core.c module
+     # signature.  Use the "Allow from all" syntax with older versions for symmetry.
+     <IfModule mod_authz_core.c>
+       Require all granted
+     </IfModule>
+     <IfModule !mod_authz_core.c>
+       Allow from all
+     </IfMOdule>
+   </Location>
+   <Location /authz-test-work/mixed>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     Satisfy Any
+   </Location>
+   <Location /authz-test-work/mixed-noauthwhenanon>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     AuthzSVNNoAuthWhenAnonymousAllowed On
+   </Location>
+   <Location /authz-test-work/authn>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+   </Location>
+   <Location /authz-test-work/authn-anonoff>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     AuthzSVNAnonymous Off
+   </Location>
+   <Location /authz-test-work/authn-lcuser>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     AuthzForceUsernameCase Lower
+   </Location>
+   <Location /authz-test-work/authn-lcuser>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     Require           valid-user
+     AuthzForceUsernameCase Lower
+   </Location>
+   <Location /authz-test-work/authn-group>
+     DAV               svn
+     SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+     AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+     SVNListParentPath On
+     AuthType          Basic
+     AuthName          "Subversion Repository"
+     AuthUserFile /usr/local/apache2/conf/users
+     AuthGroupFile /usr/local/apache2/conf/groups
+     Require           group random
+     AuthzSVNAuthoritative Off
+   </Location>
+   <IfModule mod_authz_core.c>
+     <Location /authz-test-work/sallrany>
+       DAV               svn
+       SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+       AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+       SVNListParentPath On
+       AuthType          Basic
+       AuthName          "Subversion Repository"
+       AuthUserFile /usr/local/apache2/conf/users
+       AuthzSendForbiddenOnFailure On
+       Satisfy All
+       <RequireAny>
+         Require valid-user
+         Require expr req('ALLOW') == '1'
+       </RequireAny>
+     </Location>
+     <Location /authz-test-work/sallrall>
+       DAV               svn
+       SVNParentPath /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/local_tmp
+       AuthzSVNAccessFile /home/yourusernamehere/projects/svn/subversion/tests/cmdline/svn-test-work/authz
+       SVNListParentPath On
+       AuthType          Basic
+       AuthName          "Subversion Repository"
+       AuthUserFile /usr/local/apache2/conf/users
+       AuthzSendForbiddenOnFailure On
+       Satisfy All
+       <RequireAll>
+         Require valid-user
+         Require expr req('ALLOW') == '1'
+       </RequireAll>
+     </Location>
+   </IfModule>
+
+
    RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)$ /svn-test-work/repositories/$1
    RedirectMatch           ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)$ /svn-test-work/repositories/$1
 
@@ -101,6 +228,15 @@ just drop the following 2-line snippet i
 ----------------------------
 jrandom:xCGl35kV9oWCY
 jconstant:xCGl35kV9oWCY
+JRANDOM:xCGl35kV9oWCY
+JCONSTANT:xCGl35kV9oWCY
+----------------------------
+
+and these lines into the
+/usr/local/apache/conf/groups file:
+----------------------------
+random: jrandom
+constant: jconstant
 ----------------------------
 
 Now, (re)start Apache and run the tests over mod_dav_svn.
@@ -138,6 +274,8 @@ Note [1]: It would be quite too much to
           ----------------------------
           jrandom:$apr1$3p1.....$FQW6RceW5QhJ2blWDQgKn0
           jconstant:$apr1$jp1.....$Usrqji1c9H6AbOxOGAzzb0
+          JRANDOM:$apr1$3p1.....$FQW6RceW5QhJ2blWDQgKn0
+          JCONSTANT:$apr1$jp1.....$Usrqji1c9H6AbOxOGAzzb0
           ----------------------------
 
 

Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/authz_tests.py?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/branches/fsx-1.10/subversion/tests/cmdline/authz_tests.py Thu Aug  6 14:01:38 2015
@@ -587,7 +587,10 @@ def authz_log_and_tracing_test(sbox):
   ## cat
 
   # now see if we can look at the older version of rho
-  svntest.actions.run_and_verify_svn(None, expected_err,
+
+  expected_err2 = ".*svn: E195012: Unable to find repository location.*"
+
+  svntest.actions.run_and_verify_svn(None, expected_err2,
                                      'cat', '-r', '2', D_url+'/rho')
 
   if sbox.repo_url.startswith('http'):
@@ -604,10 +607,11 @@ def authz_log_and_tracing_test(sbox):
   svntest.actions.run_and_verify_svn(None, expected_err,
                                      'diff', '-r', 'HEAD', G_url+'/rho')
 
-  svntest.actions.run_and_verify_svn(None, expected_err,
+  # diff treats the unreadable path as indicating an add so no error
+  svntest.actions.run_and_verify_svn(None, [],
                                      'diff', '-r', '2', D_url+'/rho')
 
-  svntest.actions.run_and_verify_svn(None, expected_err,
+  svntest.actions.run_and_verify_svn(None, [],
                                      'diff', '-r', '2:4', D_url+'/rho')
 
 # test whether read access is correctly granted and denied

Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/davautocheck.sh?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/branches/fsx-1.10/subversion/tests/cmdline/davautocheck.sh Thu Aug  6 14:01:38 2015
@@ -296,8 +296,6 @@ LOAD_MOD_AUTHN_CORE="$(get_loadmodule_co
     || fail "Authn_Core module not found."
 LOAD_MOD_AUTHZ_CORE="$(get_loadmodule_config mod_authz_core)" \
     || fail "Authz_Core module not found."
-LOAD_MOD_AUTHZ_HOST="$(get_loadmodule_config mod_authz_host)" \
-    || fail "Authz_Host module not found."
 LOAD_MOD_UNIXD=$(get_loadmodule_config mod_unixd) \
     || fail "UnixD module not found"
 }
@@ -305,6 +303,10 @@ LOAD_MOD_AUTHN_FILE="$(get_loadmodule_co
     || fail "Authn_File module not found."
 LOAD_MOD_AUTHZ_USER="$(get_loadmodule_config mod_authz_user)" \
     || fail "Authz_User module not found."
+LOAD_MOD_AUTHZ_GROUPFILE="$(get_loadmodule_config mod_authz_groupfile)" \
+    || fail "Authz_GroupFile module not found."
+LOAD_MOD_AUTHZ_HOST="$(get_loadmodule_config mod_authz_host)" \
+    || fail "Authz_Host module not found."
 }
 if [ ${APACHE_MPM:+set} ]; then
     LOAD_MOD_MPM=$(get_loadmodule_config mod_mpm_$APACHE_MPM) \
@@ -347,6 +349,7 @@ else
   BASE_URL="$BASE_URL:$HTTPD_PORT"
 fi
 HTTPD_USERS="$HTTPD_ROOT/users"
+HTTPD_GROUPS="$HTTPD_ROOT/groups"
 
 mkdir "$HTTPD_ROOT" \
   || fail "couldn't create temporary directory '$HTTPD_ROOT'"
@@ -408,6 +411,14 @@ say "Adding users for lock authenticatio
 $HTPASSWD -bc $HTTPD_USERS jrandom   rayjandom
 $HTPASSWD -b  $HTTPD_USERS jconstant rayjandom
 $HTPASSWD -b  $HTTPD_USERS __dumpster__ __loadster__
+$HTPASSWD -b  $HTTPD_USERS JRANDOM   rayjandom
+$HTPASSWD -b  $HTTPD_USERS JCONSTANT rayjandom
+
+say "Adding groups for mod_authz_svn tests"
+cat > "$HTTPD_GROUPS" <<__EOF__
+random: jrandom
+constant: jconstant
+__EOF__
 
 touch $HTTPD_MIME_TYPES
 
@@ -431,7 +442,9 @@ $LOAD_MOD_AUTHN_CORE
 $LOAD_MOD_AUTHN_FILE
 $LOAD_MOD_AUTHZ_CORE
 $LOAD_MOD_AUTHZ_USER
+$LOAD_MOD_AUTHZ_GROUPFILE
 $LOAD_MOD_AUTHZ_HOST
+$LOAD_MOD_ACCESS_COMPAT
 LoadModule          authz_svn_module "$MOD_AUTHZ_SVN"
 LoadModule          dontdothat_module "$MOD_DONTDOTHAT"
 
@@ -537,6 +550,147 @@ CustomLog           "$HTTPD_ROOT/ops" "%
   SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
   ${SVN_PATH_AUTHZ_LINE}
 </Location>
+<Location /authz-test-work/anon>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  # This may seem unnecessary but granting access to everyone here is necessary
+  # to exercise a bug with httpd 2.3.x+.  The "Require all granted" syntax is
+  # new to 2.3.x+ which we can detect with the mod_authz_core.c module
+  # signature.  Use the "Allow from all" syntax with older versions for symmetry.
+  <IfModule mod_authz_core.c>
+    Require all granted
+  </IfModule>
+  <IfModule !mod_authz_core.c>
+    Allow from all
+  </IfModule>
+  ${SVN_PATH_AUTHZ_LINE}
+</Location>
+<Location /authz-test-work/mixed>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  Satisfy Any
+  ${SVN_PATH_AUTHZ_LINE}
+</Location>
+<Location /authz-test-work/mixed-noauthwhenanon>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  AuthzSVNNoAuthWhenAnonymousAllowed On
+  SVNPathAuthz On
+</Location>
+<Location /authz-test-work/authn>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  ${SVN_PATH_AUTHZ_LINE}
+</Location>
+<Location /authz-test-work/authn-anonoff>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  AuthzSVNAnonymous Off
+  SVNPathAuthz On
+</Location>
+<Location /authz-test-work/authn-lcuser>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  Require           valid-user
+  AuthzForceUsernameCase Lower
+  ${SVN_PATH_AUTHZ_LINE}
+</Location>
+<Location /authz-test-work/authn-group>
+  DAV               svn
+  SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+  AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+  SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+  SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+  SVNListParentPath On
+  AuthType          Basic
+  AuthName          "Subversion Repository"
+  AuthUserFile      $HTTPD_USERS
+  AuthGroupFile     $HTTPD_GROUPS
+  Require           group random
+  AuthzSVNAuthoritative Off
+  SVNPathAuthz On
+</Location>
+<IfModule mod_authz_core.c>
+  <Location /authz-test-work/sallrany>
+    DAV               svn
+    SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+    AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+    SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+    SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+    SVNListParentPath On
+    AuthType          Basic
+    AuthName          "Subversion Repository"
+    AuthUserFile      $HTTPD_USERS
+    AuthzSendForbiddenOnFailure On
+    Satisfy All
+    <RequireAny>
+      Require valid-user
+      Require expr req('ALLOW') == '1'
+    </RequireAny>
+    ${SVN_PATH_AUTHZ_LINE}
+  </Location>
+  <Location /authz-test-work/sallrall>
+    DAV               svn
+    SVNParentPath     "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/local_tmp"
+    AuthzSVNAccessFile "$ABS_BUILDDIR/subversion/tests/cmdline/svn-test-work/authz"
+    SVNAdvertiseV2Protocol ${ADVERTISE_V2_PROTOCOL}
+    SVNCacheRevProps  ${CACHE_REVPROPS_SETTING}
+    SVNListParentPath On
+    AuthType          Basic
+    AuthName          "Subversion Repository"
+    AuthUserFile      $HTTPD_USERS
+    AuthzSendForbiddenOnFailure On
+    Satisfy All
+    <RequireAll>
+      Require valid-user
+      Require expr req('ALLOW') == '1'
+    </RequireAll>
+    ${SVN_PATH_AUTHZ_LINE}
+  </Location>
+</IfModule>
 RedirectMatch permanent ^/svn-test-work/repositories/REDIRECT-PERM-(.*)\$ /svn-test-work/repositories/\$1
 RedirectMatch           ^/svn-test-work/repositories/REDIRECT-TEMP-(.*)\$ /svn-test-work/repositories/\$1
 __EOF__

Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/svnadmin_tests.py?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/fsx-1.10/subversion/tests/cmdline/svnadmin_tests.py Thu Aug  6 14:01:38 2015
@@ -249,6 +249,18 @@ def patch_format(repo_dir, shard_size):
   os.chmod(format_path, 0666)
   open(format_path, 'wb').write(new_contents)
 
+def is_sharded(repo_dir):
+  """Return whether the FSFS repository REPO_DIR is sharded."""
+
+  format_path = os.path.join(repo_dir, "db", "format")
+  contents = open(format_path, 'rb').read()
+
+  for line in contents.split("\n"):
+    if line.startswith("layout sharded"):
+      return True
+
+  return False
+
 def load_and_verify_dumpstream(sbox, expected_stdout, expected_stderr,
                                revs, check_props, dump, *varargs):
   """Load the array of lines passed in DUMP into the current tests'
@@ -2000,6 +2012,14 @@ def mergeinfo_race(sbox):
   "concurrent mergeinfo commits invalidate pred-count"
   sbox.build()
 
+  # This test exercises two commit-time race condition bugs:
+  #
+  # (a) metadata corruption when concurrent commits change svn:mergeinfo (issue #4129)
+  # (b) false positive SVN_ERR_FS_CONFLICT error with httpv1 commits
+  #     https://mail-archives.apache.org/mod_mbox/subversion-dev/201507.mbox/%3C20150731234536.GA5395@tarsus.local2%3E
+  #
+  # Both bugs are timing-dependent and might not reproduce 100% of the time.
+
   wc_dir = sbox.wc_dir
   wc2_dir = sbox.add_wc_path('2')
 
@@ -2046,6 +2066,10 @@ def recover_old_empty(sbox):
 def verify_keep_going(sbox):
   "svnadmin verify --keep-going test"
 
+  # No support for modifying pack files
+  if svntest.main.options.fsfs_packing:
+    raise svntest.Skip('fsfs packing set')
+
   sbox.build(create_wc = False)
   repo_url = sbox.repo_url
   B_url = sbox.repo_url + '/B'
@@ -2070,8 +2094,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 +2104,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 +2127,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,8 +2149,17 @@ 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
@@ -2122,6 +2170,10 @@ def verify_keep_going(sbox):
 def verify_keep_going_quiet(sbox):
   "svnadmin verify --keep-going --quiet test"
 
+  # No support for modifying pack files
+  if svntest.main.options.fsfs_packing:
+    raise svntest.Skip('fsfs packing set')
+
   sbox.build(create_wc = False)
   repo_url = sbox.repo_url
   B_url = sbox.repo_url + '/B'
@@ -2152,11 +2204,12 @@ def verify_keep_going_quiet(sbox):
                                             ".*Error verifying revision 3.",
                                             "svnadmin: E160004:.*",
                                             "svnadmin: E160004:.*",
-                                            "svnadmin: E165011:.*"], False)
+                                            "svnadmin: E205012:.*"], False)
 
   # Insert another expected error from checksum verification
   if (svntest.main.is_fs_log_addressing()):
-    exp_err.insert(0, "svnadmin: E160004:.*")
+    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'.",
@@ -2171,6 +2224,10 @@ def verify_keep_going_quiet(sbox):
 def verify_invalid_path_changes(sbox):
   "detect invalid changed path list entries"
 
+  # No support for modifying pack files
+  if svntest.main.options.fsfs_packing:
+    raise svntest.Skip('fsfs packing set')
+
   sbox.build(create_wc = False)
   repo_url = sbox.repo_url
 
@@ -2231,23 +2288,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.*",
@@ -2268,12 +2317,36 @@ def verify_invalid_path_changes(sbox):
                                            ".*r18: E160013:.*"])
   if (svntest.main.fs_has_rep_sharing()):
     exp_out.insert(0, ".*Verifying.*metadata.*")
-    if svntest.main.is_fs_log_addressing():
-      exp_out.insert(1, ".*Verifying.*metadata.*")
+  if svntest.main.options.fsfs_sharding is not None:
+    for x in range(0, 19 / svntest.main.options.fsfs_sharding):
+      exp_out.insert(0, ".*Verifying.*metadata.*")
+  if svntest.main.is_fs_log_addressing():
+    exp_out.insert(0, ".*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'.",
@@ -2284,14 +2357,19 @@ 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.*")
-    if svntest.main.is_fs_log_addressing():
-      exp_out.insert(1, ".*Verifying.*metadata.*")
+  if svntest.main.options.fsfs_sharding is not None:
+    for x in range(0, 19 / svntest.main.options.fsfs_sharding):
+      exp_out.insert(0, ".*Verifying.*metadata.*")
+  if svntest.main.is_fs_log_addressing():
+    exp_out.insert(0, ".*Verifying.*metadata.*")
+
   if svntest.verify.verify_outputs("Unexpected error while running 'svnadmin verify'.",
                                    output, errput, exp_out, exp_err):
     raise svntest.Failure
@@ -2301,8 +2379,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
@@ -2342,6 +2425,10 @@ def verify_denormalized_names(sbox):
   if (svntest.main.fs_has_rep_sharing()):
     expected_output_regex_list.insert(0, ".*Verifying repository metadata.*")
 
+  if svntest.main.options.fsfs_sharding is not None:
+    for x in range(0, 7 / svntest.main.options.fsfs_sharding):
+      expected_output_regex_list.insert(0, ".*Verifying.*metadata.*")
+
   if svntest.main.is_fs_log_addressing():
     expected_output_regex_list.insert(0, ".* Verifying metadata at revision 0.*")
 
@@ -3025,6 +3112,25 @@ def hotcopy_read_only(sbox):
     logger.warn("Error: hotcopy failed")
     raise SVNUnexpectedStderr(errput)
 
+@SkipUnless(svntest.main.is_fs_type_fsfs)
+@SkipUnless(svntest.main.fs_has_pack)
+def fsfs_pack_non_sharded(sbox):
+  "'svnadmin pack' on a non-sharded repository"
+
+  # Configure two files per shard to trigger packing.
+  sbox.build(create_wc = False,
+             minor_version = min(svntest.main.options.server_minor_version,3))
+
+  # Skip for pre-cooked sharded repositories
+  if is_sharded(sbox.repo_dir):
+    raise svntest.Skip('sharded pre-cooked repository')
+
+  svntest.actions.run_and_verify_svnadmin(
+      None, [], "upgrade", sbox.repo_dir)
+  svntest.actions.run_and_verify_svnadmin(
+      ['svnadmin: Warning - this repository is not sharded. Packing has no effect.\n'],
+      [], "pack", sbox.repo_dir)
+
 ########################################################################
 # Run the tests
 
@@ -3082,6 +3188,7 @@ test_list = [ None,
               load_txdelta,
               load_no_svndate_r0,
               hotcopy_read_only,
+              fsfs_pack_non_sharded,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/__init__.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/__init__.py?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/__init__.py (original)
+++ subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/__init__.py Thu Aug  6 14:01:38 2015
@@ -23,11 +23,11 @@
 __all__ = [ ]
 
 import sys
-if sys.hexversion < 0x2050000:
-  sys.stderr.write('[SKIPPED] at least Python 2.5 is required\n')
+if sys.hexversion < 0x2070000:
+  sys.stderr.write('[SKIPPED] at least Python 2.7 is required\n')
 
   # note: exiting is a bit harsh for a library module, but we really do
-  # require Python 2.5. this package isn't going to work otherwise.
+  # require Python 2.7. this package isn't going to work otherwise.
 
   # we're skipping this test, not failing, so exit with 0
   sys.exit(0)

Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/main.py?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/main.py Thu Aug  6 14:01:38 2015
@@ -1545,6 +1545,12 @@ def is_mod_dav_url_quoting_broken():
         return (options.httpd_version in __mod_dav_url_quoting_broken_versions)
     return None
 
+def is_httpd_authz_provider_enabled():
+    if is_ra_type_dav():
+      v = options.httpd_version.split('.')
+      return (v[0] == '2' and int(v[1]) >= 3) or int(v[0]) > 2
+    return None
+
 ######################################################################
 
 

Modified: subversion/branches/fsx-1.10/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c (original)
+++ subversion/branches/fsx-1.10/subversion/tests/libsvn_fs_fs/fs-fs-fuzzy-test.c Thu Aug  6 14:01:38 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/fsx-1.10/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c (original)
+++ subversion/branches/fsx-1.10/subversion/tests/libsvn_fs_fs/fs-fs-private-test.c Thu Aug  6 14:01:38 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
   };
 

Modified: subversion/branches/fsx-1.10/subversion/tests/libsvn_repos/dump-load-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/libsvn_repos/dump-load-test.c?rev=1694500&r1=1694499&r2=1694500&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/tests/libsvn_repos/dump-load-test.c (original)
+++ subversion/branches/fsx-1.10/subversion/tests/libsvn_repos/dump-load-test.c Thu Aug  6 14:01:38 2015
@@ -76,8 +76,8 @@ test_dump_bad_props(svn_stringbuf_t **du
   SVN_TEST_ASSERT(SVN_IS_VALID_REVNUM(youngest_rev));
 
   /* Test that a dump completes without error. */
-  SVN_ERR(svn_repos_dump_fs3(repos, stream, start_rev, end_rev,
-                             FALSE, FALSE,
+  SVN_ERR(svn_repos_dump_fs4(repos, stream, start_rev, end_rev,
+                             FALSE, FALSE, TRUE, TRUE,
                              notify_func, notify_baton,
                              NULL, NULL,
                              pool));



Mime
View raw message