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

svn commit: r1649205 [26/30] - in /subversion/branches/authzperf: ./ build/ build/ac-macros/ notes/ subversion/bindings/ctypes-python/ subversion/bindings/cxxhl/ subversion/bindings/javahl/tests/org/apache/subversion/javahl/ subversion/bindings/swig/ s...

Modified: subversion/branches/authzperf/subversion/svn-bench/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svn-bench/cl.h?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svn-bench/cl.h (original)
+++ subversion/branches/authzperf/subversion/svn-bench/cl.h Sat Jan  3 14:00:41 2015
@@ -90,8 +90,12 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t no_revprops;     /* retrieve no revprops */
   apr_hash_t *revprop_table;     /* table of revision properties to get/set */
   svn_boolean_t use_merge_history; /* use/display extra merge information */
-  svn_boolean_t trust_server_cert; /* trust server SSL certs that would
-                                      otherwise be rejected as "untrusted" */
+  /* trust server SSL certs that would otherwise be rejected as "untrusted" */
+  svn_boolean_t trust_server_cert_unknown_ca;
+  svn_boolean_t trust_server_cert_cn_mismatch;
+  svn_boolean_t trust_server_cert_expired;
+  svn_boolean_t trust_server_cert_not_yet_valid;
+  svn_boolean_t trust_server_cert_other_failure;
 } svn_cl__opt_state_t;
 
 

Modified: subversion/branches/authzperf/subversion/svn-bench/help-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svn-bench/help-cmd.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svn-bench/help-cmd.c (original)
+++ subversion/branches/authzperf/subversion/svn-bench/help-cmd.c Sat Jan  3 14:00:41 2015
@@ -45,10 +45,9 @@ svn_cl__help(apr_getopt_t *os,
 {
   svn_cl__opt_state_t *opt_state;
 
-  /* xgettext: the %s is for SVN_VER_NUMBER. */
-  char help_header_template[] =
+  char help_header[] =
   N_("usage: svn-bench <subcommand> [options] [args]\n"
-     "Subversion command-line client, version %s.\n"
+     "Subversion benchmarking tool.\n"
      "Type 'svn-bench help <subcommand>' for help on a specific subcommand.\n"
      "Type 'svn-bench --version' to see the program version and RA modules\n"
      "  or 'svn-bench --version --quiet' to see just the version number.\n"
@@ -63,9 +62,6 @@ svn_cl__help(apr_getopt_t *os,
   N_("Subversion is a tool for version control.\n"
      "For additional information, see http://subversion.apache.org/\n");
 
-  char *help_header =
-    apr_psprintf(pool, _(help_header_template), SVN_VER_NUMBER);
-
   const char *ra_desc_start
     = _("The following repository access (RA) modules are available:\n\n");
 

Modified: subversion/branches/authzperf/subversion/svn-bench/svn-bench.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svn-bench/svn-bench.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svn-bench/svn-bench.c (original)
+++ subversion/branches/authzperf/subversion/svn-bench/svn-bench.c Sat Jan  3 14:00:41 2015
@@ -67,6 +67,11 @@ typedef enum svn_cl__longopt_t {
   opt_with_all_revprops,
   opt_with_no_revprops,
   opt_trust_server_cert,
+  opt_trust_server_cert_unknown_ca,
+  opt_trust_server_cert_cn_mismatch,
+  opt_trust_server_cert_expired,
+  opt_trust_server_cert_not_yet_valid,
+  opt_trust_server_cert_other_failure,
   opt_changelist
 } svn_cl__longopt_t;
 
@@ -122,11 +127,29 @@ const apr_getopt_option_t svn_cl__option
   {"no-auth-cache", opt_no_auth_cache, 0,
                     N_("do not cache authentication tokens")},
   {"trust-server-cert", opt_trust_server_cert, 0,
-                    N_("accept SSL server certificates from unknown\n"
+                    N_("deprecated; same as --trust-unknown-ca")},
+  {"trust-unknown-ca", opt_trust_server_cert_unknown_ca, 0,
+                    N_("with --non-interactive, accept SSL server\n"
                        "                             "
-                       "certificate authorities without prompting (but only\n"
+                       "certificates from unknown certificate authorities")},
+  {"trust-cn-mismatch", opt_trust_server_cert_cn_mismatch, 0,
+                    N_("with --non-interactive, accept SSL server\n"
                        "                             "
-                       "with '--non-interactive')") },
+                       "certificates even if the server hostname does not\n"
+                       "                             "
+                       "match the certificate's common name attribute")},
+  {"trust-expired", opt_trust_server_cert_expired, 0,
+                    N_("with --non-interactive, accept expired SSL server\n"
+                       "                             "
+                       "certificates")},
+  {"trust-not-yet-valid", opt_trust_server_cert_not_yet_valid, 0,
+                    N_("with --non-interactive, accept SSL server\n"
+                       "                             "
+                       "certificates from the future")},
+  {"trust-other-failure", opt_trust_server_cert_other_failure, 0,
+                    N_("with --non-interactive, accept SSL server\n"
+                       "                             "
+                       "certificates with failures other than the above")},
   {"non-interactive", opt_non_interactive, 0,
                     N_("do no interactive prompting")},
   {"config-dir",    opt_config_dir, 1,
@@ -182,7 +205,10 @@ const apr_getopt_option_t svn_cl__option
    willy-nilly to every invocation of 'svn') . */
 const int svn_cl__global_options[] =
 { opt_auth_username, opt_auth_password, opt_no_auth_cache, opt_non_interactive,
-  opt_trust_server_cert, opt_config_dir, opt_config_options, 0
+  opt_trust_server_cert, opt_trust_server_cert_unknown_ca,
+  opt_trust_server_cert_cn_mismatch, opt_trust_server_cert_expired,
+  opt_trust_server_cert_not_yet_valid, opt_trust_server_cert_other_failure,
+  opt_config_dir, opt_config_options, 0
 };
 
 const svn_opt_subcommand_desc2_t svn_cl__cmd_table[] =
@@ -206,7 +232,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
 
   { "null-list", svn_cl__null_list, {"ls"}, N_
     ("List directory entries in the repository.\n"
-     "usage: list [TARGET[@REV]...]\n"
+     "usage: null-list [TARGET[@REV]...]\n"
      "\n"
      "  List each TARGET file and the contents of each TARGET directory as\n"
      "  they exist in the repository.  If TARGET is a working copy path, the\n"
@@ -262,7 +288,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
 
   { "null-info", svn_cl__null_info, {0}, N_
     ("Display information about a local or remote item.\n"
-     "usage: info [TARGET[@REV]...]\n"
+     "usage: null-info [TARGET[@REV]...]\n"
      "\n"
      "  Print information about each TARGET (default: '.').\n"
      "  TARGET may be either a working-copy path or URL.  If specified, REV\n"
@@ -578,8 +604,21 @@ sub_main(int *exit_code, int argc, const
       case opt_non_interactive:
         opt_state.non_interactive = TRUE;
         break;
-      case opt_trust_server_cert:
-        opt_state.trust_server_cert = TRUE;
+      case opt_trust_server_cert: /* backwards compat to 1.8 */
+      case opt_trust_server_cert_unknown_ca:
+        opt_state.trust_server_cert_unknown_ca = TRUE;
+        break;
+      case opt_trust_server_cert_cn_mismatch:
+        opt_state.trust_server_cert_cn_mismatch = TRUE;
+        break;
+      case opt_trust_server_cert_expired:
+        opt_state.trust_server_cert_expired = TRUE;
+        break;
+      case opt_trust_server_cert_not_yet_valid:
+        opt_state.trust_server_cert_not_yet_valid = TRUE;
+        break;
+      case opt_trust_server_cert_other_failure:
+        opt_state.trust_server_cert_other_failure = TRUE;
         break;
       case 'x':
         SVN_ERR(svn_utf_cstring_to_utf8(&opt_state.extensions,
@@ -756,12 +795,29 @@ sub_main(int *exit_code, int argc, const
                                 "are mutually exclusive"));
     }
 
-  /* --trust-server-cert can only be used with --non-interactive */
-  if (opt_state.trust_server_cert && !opt_state.non_interactive)
+  /* --trust-* options can only be used with --non-interactive */
+  if (!opt_state.non_interactive)
     {
-      return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                              _("--trust-server-cert requires "
-                                "--non-interactive"));
+      if (opt_state.trust_server_cert_unknown_ca)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("--trust-unknown-ca requires "
+                                  "--non-interactive"));
+      if (opt_state.trust_server_cert_cn_mismatch)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("--trust-cn-mismatch requires "
+                                  "--non-interactive"));
+      if (opt_state.trust_server_cert_expired)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("--trust-expired requires "
+                                  "--non-interactive"));
+      if (opt_state.trust_server_cert_not_yet_valid)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("--trust-not-yet-valid requires "
+                                  "--non-interactive"));
+      if (opt_state.trust_server_cert_other_failure)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("--trust-other-failure requires "
+                                  "--non-interactive"));
     }
 
   /* Ensure that 'revision_ranges' has at least one item, and make
@@ -867,17 +923,22 @@ sub_main(int *exit_code, int argc, const
 #endif
 
   /* Set up Authentication stuff. */
-  SVN_ERR(svn_cmdline_create_auth_baton(&ab,
-                                            opt_state.non_interactive,
-                                            opt_state.auth_username,
-                                            opt_state.auth_password,
-                                            opt_state.config_dir,
-                                            opt_state.no_auth_cache,
-                                            opt_state.trust_server_cert,
-                                            cfg_config,
-                                            ctx->cancel_func,
-                                            ctx->cancel_baton,
-                                            pool));
+  SVN_ERR(svn_cmdline_create_auth_baton2(
+            &ab,
+            opt_state.non_interactive,
+            opt_state.auth_username,
+            opt_state.auth_password,
+            opt_state.config_dir,
+            opt_state.no_auth_cache,
+            opt_state.trust_server_cert_unknown_ca,
+            opt_state.trust_server_cert_cn_mismatch,
+            opt_state.trust_server_cert_expired,
+            opt_state.trust_server_cert_not_yet_valid,
+            opt_state.trust_server_cert_other_failure,
+            cfg_config,
+            ctx->cancel_func,
+            ctx->cancel_baton,
+            pool));
 
   ctx->auth_baton = ab;
 

Modified: subversion/branches/authzperf/subversion/svn/auth-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svn/auth-cmd.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svn/auth-cmd.c (original)
+++ subversion/branches/authzperf/subversion/svn/auth-cmd.c Sat Jan  3 14:00:41 2015
@@ -293,7 +293,6 @@ svn_error_t *
 svn_cl__auth(apr_getopt_t *os, void *baton, apr_pool_t *pool)
 {
   svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
-  svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
   const char *config_path;
   struct walk_credentials_baton_t b;
 
@@ -301,11 +300,17 @@ svn_cl__auth(apr_getopt_t *os, void *bat
   b.show_passwords = opt_state->show_passwords;
   b.list = !opt_state->remove;
   b.delete = opt_state->remove;
+  b.patterns = apr_array_make(pool, 1, sizeof(const char *));
+  for (; os->ind < os->argc; os->ind++)
+    {
+      /* The apr_getopt targets are still in native encoding. */
+      const char *raw_target = os->argv[os->ind];
+      const char *utf8_target;
 
-  SVN_ERR(svn_cl__args_to_target_array_print_reserved(&b.patterns, os,
-                                                      opt_state->targets,
-                                                      ctx, FALSE,
-                                                      pool));
+      SVN_ERR(svn_utf_cstring_to_utf8(&utf8_target,
+                                      raw_target, pool));
+      APR_ARRAY_PUSH(b.patterns, const char *) = utf8_target;
+    }
 
   SVN_ERR(svn_config_get_user_config_path(&config_path,
                                           opt_state->config_dir, NULL,

Modified: subversion/branches/authzperf/subversion/svn/checkout-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svn/checkout-cmd.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svn/checkout-cmd.c (original)
+++ subversion/branches/authzperf/subversion/svn/checkout-cmd.c Sat Jan  3 14:00:41 2015
@@ -72,6 +72,7 @@ svn_cl__checkout(apr_getopt_t *os,
   svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
   apr_pool_t *subpool;
   apr_array_header_t *targets;
+  struct svn_cl__check_externals_failed_notify_baton nwb;
   const char *last_target, *local_dir;
   int i;
 
@@ -113,6 +114,12 @@ svn_cl__checkout(apr_getopt_t *os,
   if (! opt_state->quiet)
     SVN_ERR(svn_cl__notifier_mark_checkout(ctx->notify_baton2));
 
+  nwb.wrapped_func = ctx->notify_func2;
+  nwb.wrapped_baton = ctx->notify_baton2;
+  nwb.had_externals_error = FALSE;
+  ctx->notify_func2 = svn_cl__check_externals_failed_notify_wrapper;
+  ctx->notify_baton2 = &nwb;
+
   subpool = svn_pool_create(pool);
   for (i = 0; i < targets->nelts; ++i)
     {
@@ -169,5 +176,10 @@ svn_cl__checkout(apr_getopt_t *os,
     }
   svn_pool_destroy(subpool);
 
+  if (nwb.had_externals_error)
+    return svn_error_create(SVN_ERR_CL_ERROR_PROCESSING_EXTERNALS, NULL,
+                            _("Failure occurred processing one or "
+                              "more externals definitions"));
+
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/authzperf/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svn/cl.h?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svn/cl.h (original)
+++ subversion/branches/authzperf/subversion/svn/cl.h Sat Jan  3 14:00:41 2015
@@ -227,8 +227,12 @@ typedef struct svn_cl__opt_state_t
   svn_cl__show_revs_t show_revs;   /* mergeinfo flavor */
   svn_depth_t set_depth;           /* new sticky ambient depth value */
   svn_boolean_t reintegrate;      /* use "reintegrate" merge-source heuristic */
-  svn_boolean_t trust_server_cert; /* trust server SSL certs that would
-                                      otherwise be rejected as "untrusted" */
+  /* trust server SSL certs that would otherwise be rejected as "untrusted" */
+  svn_boolean_t trust_server_cert_unknown_ca;
+  svn_boolean_t trust_server_cert_cn_mismatch;
+  svn_boolean_t trust_server_cert_expired;
+  svn_boolean_t trust_server_cert_not_yet_valid;
+  svn_boolean_t trust_server_cert_other_failure;
   int strip; /* number of leading path components to strip */
   svn_boolean_t ignore_keywords;   /* do not expand keywords */
   svn_boolean_t reverse_diff;      /* reverse a diff (e.g. when patching) */

Modified: subversion/branches/authzperf/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svn/conflict-callbacks.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/authzperf/subversion/svn/conflict-callbacks.c Sat Jan  3 14:00:41 2015
@@ -695,6 +695,10 @@ handle_text_conflict(svn_wc_conflict_res
                                 b->path_prefix, desc->local_abspath,
                                 scratch_pool)));
 
+  /* ### TODO This whole feature availability check is grossly outdated.
+     DIFF_ALLOWED needs either to be redefined or to go away.
+   */
+
   /* Diffing can happen between base and merged, to show conflict
      markers to the user (this is the typical 3-way merge
      scenario), or if no base is available, we can show a diff
@@ -714,9 +718,15 @@ handle_text_conflict(svn_wc_conflict_res
       *next_option++ = "p";
       if (diff_allowed)
         {
-          *next_option++ = "df";
+          /* We need one more path for this feature. */
+          if (desc->my_abspath)
+            *next_option++ = "df";
+
           *next_option++ = "e";
-          *next_option++ = "m";
+
+          /* We need one more path for this feature. */
+          if (desc->my_abspath)
+            *next_option++ = "m";
 
           if (knows_something)
             *next_option++ = "r";
@@ -781,7 +791,8 @@ handle_text_conflict(svn_wc_conflict_res
         }
       else if (strcmp(opt->code, "df") == 0)
         {
-          if (! diff_allowed)
+          /* Re-check preconditions. */
+          if (! diff_allowed || desc->my_abspath)
             {
               SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                              _("Invalid option; there's no "
@@ -805,6 +816,15 @@ handle_text_conflict(svn_wc_conflict_res
         {
           svn_error_t *err;
 
+          /* Re-check preconditions. */
+          if (! desc->my_abspath)
+            {
+              SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
+                             _("Invalid option; there's no "
+                                "base path to merge.\n\n")));
+              continue;
+            }
+
           err = svn_cl__merge_file_externally(desc->base_abspath,
                                               desc->their_abspath,
                                               desc->my_abspath,

Modified: subversion/branches/authzperf/subversion/svn/export-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svn/export-cmd.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svn/export-cmd.c (original)
+++ subversion/branches/authzperf/subversion/svn/export-cmd.c Sat Jan  3 14:00:41 2015
@@ -85,7 +85,15 @@ svn_cl__export(apr_getopt_t *os,
 
       if (strcmp("", to) != 0)
         /* svn_cl__eat_peg_revisions() but only on one target */
-        SVN_ERR(svn_opt__split_arg_at_peg_revision(&to, NULL, to, pool));
+        {
+          const char *peg;
+
+          SVN_ERR(svn_opt__split_arg_at_peg_revision(&to, &peg, to, pool));
+          if (peg[0] && peg[1])
+            return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                     _("'%s': a peg revision is not allowed here"),
+                                     APR_ARRAY_IDX(targets, 1, const char *));
+        }
     }
 
   SVN_ERR(svn_cl__check_target_is_local_path(to));

Modified: subversion/branches/authzperf/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svn/svn.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svn/svn.c (original)
+++ subversion/branches/authzperf/subversion/svn/svn.c Sat Jan  3 14:00:41 2015
@@ -125,6 +125,11 @@ typedef enum svn_cl__longopt_t {
   opt_show_revs,
   opt_reintegrate,
   opt_trust_server_cert,
+  opt_trust_server_cert_unknown_ca,
+  opt_trust_server_cert_cn_mismatch,
+  opt_trust_server_cert_expired,
+  opt_trust_server_cert_not_yet_valid,
+  opt_trust_server_cert_other_failure,
   opt_strip,
   opt_ignore_keywords,
   opt_reverse_diff,
@@ -236,11 +241,29 @@ const apr_getopt_option_t svn_cl__option
   {"no-auth-cache", opt_no_auth_cache, 0,
                     N_("do not cache authentication tokens")},
   {"trust-server-cert", opt_trust_server_cert, 0,
-                    N_("accept SSL server certificates from unknown\n"
+                    N_("deprecated; same as --trust-unknown-ca")},
+  {"trust-unknown-ca", opt_trust_server_cert_unknown_ca, 0,
+                    N_("with --non-interactive, accept SSL server\n"
                        "                             "
-                       "certificate authorities without prompting (but only\n"
+                       "certificates from unknown certificate authorities")},
+  {"trust-cn-mismatch", opt_trust_server_cert_cn_mismatch, 0,
+                    N_("with --non-interactive, accept SSL server\n"
                        "                             "
-                       "with '--non-interactive')") },
+                       "certificates even if the server hostname does not\n"
+                       "                             "
+                       "match the certificate's common name attribute")},
+  {"trust-expired", opt_trust_server_cert_expired, 0,
+                    N_("with --non-interactive, accept expired SSL server\n"
+                       "                             "
+                       "certificates")},
+  {"trust-not-yet-valid", opt_trust_server_cert_not_yet_valid, 0,
+                    N_("with --non-interactive, accept SSL server\n"
+                       "                             "
+                       "certificates from the future")},
+  {"trust-other-failure", opt_trust_server_cert_other_failure, 0,
+                    N_("with --non-interactive, accept SSL server\n"
+                       "                             "
+                       "certificates with failures other than the above")},
   {"non-interactive", opt_non_interactive, 0,
                     N_("do no interactive prompting (default is to prompt\n"
                        "                             "
@@ -427,8 +450,11 @@ const apr_getopt_option_t svn_cl__option
    willy-nilly to every invocation of 'svn') . */
 const int svn_cl__global_options[] =
 { opt_auth_username, opt_auth_password, opt_no_auth_cache, opt_non_interactive,
-  opt_force_interactive, opt_trust_server_cert, opt_config_dir,
-  opt_config_options, 0
+  opt_force_interactive, opt_trust_server_cert,
+  opt_trust_server_cert_unknown_ca, opt_trust_server_cert_cn_mismatch,
+  opt_trust_server_cert_expired, opt_trust_server_cert_not_yet_valid,
+  opt_trust_server_cert_other_failure,
+  opt_config_dir, opt_config_options, 0
 };
 
 /* Options for giving a log message.  (Some of these also have other uses.)
@@ -1505,9 +1531,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "                  another Subversion client modifying the working copy\n"
      "      ' ' not locked for writing\n"
      "      'L' locked for writing\n"
-     "    Fourth column: Scheduled commit will contain addition-with-history\n"
-     "      ' ' no history scheduled with commit\n"
-     "      '+' history scheduled with commit\n"
+     "    Fourth column: Scheduled commit will create a copy (addition-with-history)\n"
+     "      ' ' no history scheduled with commit (item was newly added)\n"
+     "      '+' history scheduled with commit (item was copied)\n"
      "    Fifth column: Whether the item is switched or a file external\n"
      "      ' ' normal\n"
      "      'S' the item has a Switched URL relative to the parent\n"
@@ -2124,8 +2150,21 @@ sub_main(int *exit_code, int argc, const
       case opt_force_interactive:
         force_interactive = TRUE;
         break;
-      case opt_trust_server_cert:
-        opt_state.trust_server_cert = TRUE;
+      case opt_trust_server_cert: /* backwards compat to 1.8 */
+      case opt_trust_server_cert_unknown_ca:
+        opt_state.trust_server_cert_unknown_ca = TRUE;
+        break;
+      case opt_trust_server_cert_cn_mismatch:
+        opt_state.trust_server_cert_cn_mismatch = TRUE;
+        break;
+      case opt_trust_server_cert_expired:
+        opt_state.trust_server_cert_expired = TRUE;
+        break;
+      case opt_trust_server_cert_not_yet_valid:
+        opt_state.trust_server_cert_not_yet_valid = TRUE;
+        break;
+      case opt_trust_server_cert_other_failure:
+        opt_state.trust_server_cert_other_failure = TRUE;
         break;
       case opt_no_diff_added:
         opt_state.diff.no_diff_added = TRUE;
@@ -2551,12 +2590,29 @@ sub_main(int *exit_code, int argc, const
                                 "are mutually exclusive"));
     }
 
-  /* --trust-server-cert can only be used with --non-interactive */
-  if (opt_state.trust_server_cert && !opt_state.non_interactive)
+  /* --trust-* options can only be used with --non-interactive */
+  if (!opt_state.non_interactive)
     {
-      return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                              _("--trust-server-cert requires "
-                                "--non-interactive"));
+      if (opt_state.trust_server_cert_unknown_ca)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("--trust-unknown-ca requires "
+                                  "--non-interactive"));
+      if (opt_state.trust_server_cert_cn_mismatch)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("--trust-cn-mismatch requires "
+                                  "--non-interactive"));
+      if (opt_state.trust_server_cert_expired)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("--trust-expired requires "
+                                  "--non-interactive"));
+      if (opt_state.trust_server_cert_not_yet_valid)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("--trust-not-yet-valid requires "
+                                  "--non-interactive"));
+      if (opt_state.trust_server_cert_other_failure)
+        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                _("--trust-other-failure requires "
+                                  "--non-interactive"));
     }
 
   /* Disallow simultaneous use of both --diff-cmd and
@@ -2874,17 +2930,22 @@ sub_main(int *exit_code, int argc, const
 #endif
 
   /* Set up Authentication stuff. */
-  SVN_ERR(svn_cmdline_create_auth_baton(&ab,
-                                        opt_state.non_interactive,
-                                        opt_state.auth_username,
-                                        opt_state.auth_password,
-                                        opt_state.config_dir,
-                                        opt_state.no_auth_cache,
-                                        opt_state.trust_server_cert,
-                                        cfg_config,
-                                        ctx->cancel_func,
-                                        ctx->cancel_baton,
-                                        pool));
+  SVN_ERR(svn_cmdline_create_auth_baton2(
+            &ab,
+            opt_state.non_interactive,
+            opt_state.auth_username,
+            opt_state.auth_password,
+            opt_state.config_dir,
+            opt_state.no_auth_cache,
+            opt_state.trust_server_cert_unknown_ca,
+            opt_state.trust_server_cert_cn_mismatch,
+            opt_state.trust_server_cert_expired,
+            opt_state.trust_server_cert_not_yet_valid,
+            opt_state.trust_server_cert_other_failure,
+            cfg_config,
+            ctx->cancel_func,
+            ctx->cancel_baton,
+            pool));
 
   ctx->auth_baton = ab;
 

Modified: subversion/branches/authzperf/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svn/util.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svn/util.c (original)
+++ subversion/branches/authzperf/subversion/svn/util.c Sat Jan  3 14:00:41 2015
@@ -560,8 +560,8 @@ svn_cl__error_checked_fputs(const char *
 
   if (fputs(string, stream) == EOF)
     {
-      if (errno)
-        return svn_error_wrap_apr(errno, _("Write error"));
+      if (apr_get_os_error()) /* is errno on POSIX */
+        return svn_error_wrap_apr(apr_get_os_error(), _("Write error"));
       else
         return svn_error_create(SVN_ERR_IO_WRITE_ERROR, NULL, NULL);
     }

Modified: subversion/branches/authzperf/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svnadmin/svnadmin.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/authzperf/subversion/svnadmin/svnadmin.c Sat Jan  3 14:00:41 2015
@@ -329,7 +329,7 @@ static const apr_getopt_option_t options
         "                             identical")},
 
     {"metadata-only", svnadmin__metadata_only, 0,
-     N_("verify metadata only (ignored for BDB),"
+     N_("verify metadata only (ignored for BDB),\n"
         "                             checking against external corruption in\n"
         "                             Subversion 1.9+ format repositories.\n")},
 
@@ -358,14 +358,16 @@ static const svn_opt_subcommand_desc2_t
     } },
 
   {"delrevprop", subcommand_delrevprop, {0}, N_
-   ("usage: svnadmin delrevprop REPOS_PATH -r REVISION NAME\n\n"
-    "Delete the property NAME on revision REVISION. Use\n"
-    "--use-pre-revprop-change-hook/--use-post-revprop-change-hook to trigger\n"
-    "the revision property-related hooks (for example, if you want an email\n"
-    "notification sent from your post-revprop-change hook).\n\n"
+   ("usage: 1. svnadmin delrevprop REPOS_PATH -r REVISION NAME\n"
+    "                   2. svnadmin delrevprop REPO_PATH -t TXN NAME\n\n"
+    "1. Delete the property NAME on revision REVISION.\n\n"
+    "Use --use-pre-revprop-change-hook/--use-post-revprop-change-hook to\n"
+    "trigger the revision property-related hooks (for example, if you want\n"
+    "an email notification sent from your post-revprop-change hook).\n\n"
     "NOTE: Revision properties are not versioned, so this command will\n"
-    "irreversibly destroy the previous value of the property.\n"),
-   {'r', svnadmin__use_pre_revprop_change_hook,
+    "irreversibly destroy the previous value of the property.\n\n"
+    "2. Delete the property NAME on transaction TXN.\n"),
+   {'r', 't', svnadmin__use_pre_revprop_change_hook,
     svnadmin__use_post_revprop_change_hook} },
 
   {"deltify", subcommand_deltify, {0}, N_
@@ -497,14 +499,16 @@ static const svn_opt_subcommand_desc2_t
    {'r', svnadmin__bypass_hooks} },
 
   {"setrevprop", subcommand_setrevprop, {0}, N_
-   ("usage: svnadmin setrevprop REPOS_PATH -r REVISION NAME FILE\n\n"
-    "Set the property NAME on revision REVISION to the contents of FILE. Use\n"
-    "--use-pre-revprop-change-hook/--use-post-revprop-change-hook to trigger\n"
-    "the revision property-related hooks (for example, if you want an email\n"
-    "notification sent from your post-revprop-change hook).\n\n"
+   ("usage: 1. svnadmin setrevprop REPOS_PATH -r REVISION NAME FILE\n"
+    "                   2. svnadmin setrevprop REPOS_PATH -t TXN NAME FILE\n\n"
+    "1. Set the property NAME on revision REVISION to the contents of FILE.\n\n"
+    "Use --use-pre-revprop-change-hook/--use-post-revprop-change-hook to\n"
+    "trigger the revision property-related hooks (for example, if you want\n"
+    "an email notification sent from your post-revprop-change hook).\n\n"
     "NOTE: Revision properties are not versioned, so this command will\n"
-    "overwrite the previous value of the property.\n"),
-   {'r', svnadmin__use_pre_revprop_change_hook,
+    "overwrite the previous value of the property.\n\n"
+    "2. Set the property NAME on transaction TXN to the contents of FILE.\n"),
+   {'r', 't', svnadmin__use_pre_revprop_change_hook,
     svnadmin__use_post_revprop_change_hook} },
 
   {"setuuid", subcommand_setuuid, {0}, N_
@@ -1609,7 +1613,7 @@ subcommand_rmtxns(apr_getopt_t *os, void
 
 
 /* A helper for the 'setrevprop' and 'setlog' commands.  Expects
-   OPT_STATE->use_pre_revprop_change_hook and
+   OPT_STATE->txn_id, OPT_STATE->use_pre_revprop_change_hook and
    OPT_STATE->use_post_revprop_change_hook to be set appropriately.
    If FILENAME is NULL, delete property PROP_NAME.  */
 static svn_error_t *
@@ -1640,9 +1644,16 @@ set_revprop(const char *prop_name, const
   /* Open the filesystem  */
   SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));
 
-  /* If we are bypassing the hooks system, we just hit the filesystem
-     directly. */
-  SVN_ERR(svn_repos_fs_change_rev_prop4(
+  if (opt_state->txn_id)
+    {
+      svn_fs_t *fs = svn_repos_fs(repos);
+      svn_fs_txn_t *txn;
+
+      SVN_ERR(svn_fs_open_txn(&txn, fs, opt_state->txn_id, pool));
+      SVN_ERR(svn_fs_change_txn_prop(txn, prop_name, prop_value, pool));
+    }
+  else
+    SVN_ERR(svn_repos_fs_change_rev_prop4(
               repos, opt_state->start_revision.value.number,
               NULL, prop_name, NULL, prop_value,
               opt_state->use_pre_revprop_change_hook,
@@ -1667,7 +1678,21 @@ subcommand_setrevprop(apr_getopt_t *os,
   filename = APR_ARRAY_IDX(args, 1, const char *);
   SVN_ERR(target_arg_to_dirent(&filename, filename, pool));
 
-  if (opt_state->start_revision.kind != svn_opt_revision_number)
+  if (opt_state->txn_id)
+    {
+      if (opt_state->start_revision.kind != svn_opt_revision_unspecified
+          || opt_state->end_revision.kind != svn_opt_revision_unspecified)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("--revision (-r) and --transaction (-t) "
+                                   "are mutually exclusive"));
+
+      if (opt_state->use_pre_revprop_change_hook
+          || opt_state->use_post_revprop_change_hook)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("Calling hooks is incompatible with "
+                                   "--transaction (-t)"));
+    }
+  else if (opt_state->start_revision.kind != svn_opt_revision_number)
     return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                              _("Missing revision"));
   else if (opt_state->end_revision.kind != svn_opt_revision_unspecified)
@@ -2002,6 +2027,11 @@ subcommand_info(apr_getopt_t *os, void *
             SVN_ERR(svn_cmdline_printf(pool, _("FSFS Shards Packed: %ld/%ld\n"),
                                        shards_packed, shards_full));
           }
+
+        if (fsfs_info->log_addressing)
+          SVN_ERR(svn_cmdline_printf(pool, _("FSFS Logical Addressing: yes\n")));
+        else
+          SVN_ERR(svn_cmdline_printf(pool, _("FSFS Logical Addressing: no\n")));
       }
   }
 
@@ -2348,7 +2378,21 @@ subcommand_delrevprop(apr_getopt_t *os,
   SVN_ERR(parse_args(&args, os, 1, 1, pool));
   prop_name = APR_ARRAY_IDX(args, 0, const char *);
 
-  if (opt_state->start_revision.kind != svn_opt_revision_number)
+  if (opt_state->txn_id)
+    {
+      if (opt_state->start_revision.kind != svn_opt_revision_unspecified
+          || opt_state->end_revision.kind != svn_opt_revision_unspecified)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("--revision (-r) and --transaction (-t) "
+                                   "are mutually exclusive"));
+
+      if (opt_state->use_pre_revprop_change_hook
+          || opt_state->use_post_revprop_change_hook)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("Calling hooks is incompatible with "
+                                   "--transaction (-t)"));
+    }
+  else if (opt_state->start_revision.kind != svn_opt_revision_number)
     return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                              _("Missing revision"));
   else if (opt_state->end_revision.kind != svn_opt_revision_unspecified)

Modified: subversion/branches/authzperf/subversion/svndumpfilter/svndumpfilter.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svndumpfilter/svndumpfilter.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svndumpfilter/svndumpfilter.c (original)
+++ subversion/branches/authzperf/subversion/svndumpfilter/svndumpfilter.c Sat Jan  3 14:00:41 2015
@@ -791,10 +791,16 @@ adjust_mergeinfo(svn_string_t **final_va
      start of all history.  E.g. if we dump -r100:400 then dumpfilter the
      result with --skip-missing-merge-sources, any mergeinfo with revision
      100 implies a change of -r99:100, but r99 is part of the history we
-     want filtered.  This is analogous to how r1 is always meaningless as
-     a merge source revision.
+     want filtered.
 
      If the oldest rev is r0 then there is nothing to filter. */
+
+  /* ### This seems to cater only for use cases where the revisions being
+         processed are not following on from revisions that will already
+         exist in the destination repository. If the revisions being
+         processed do follow on, then we might want to keep the mergeinfo
+         that refers to those older revisions. */
+
   if (rb->pb->skip_missing_merge_sources && rb->pb->oldest_original_rev > 0)
     SVN_ERR(svn_mergeinfo__filter_mergeinfo_by_ranges(
       &mergeinfo, mergeinfo,
@@ -852,7 +858,7 @@ adjust_mergeinfo(svn_string_t **final_va
       svn_hash_sets(final_mergeinfo, merge_source, rangelist);
     }
 
-  SVN_ERR(svn_mergeinfo_sort(final_mergeinfo, subpool));
+  SVN_ERR(svn_mergeinfo__canonicalize_ranges(final_mergeinfo, subpool));
   SVN_ERR(svn_mergeinfo_to_string(final_val, final_mergeinfo, pool));
   svn_pool_destroy(subpool);
 

Modified: subversion/branches/authzperf/subversion/svnfsfs/dump-index-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svnfsfs/dump-index-cmd.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svnfsfs/dump-index-cmd.c (original)
+++ subversion/branches/authzperf/subversion/svnfsfs/dump-index-cmd.c Sat Jan  3 14:00:41 2015
@@ -20,14 +20,11 @@
  * ====================================================================
  */
 
+#define APR_WANT_BYTEFUNC
+
 #include "svn_dirent_uri.h"
 #include "svn_pools.h"
-
-#include "../libsvn_fs_fs/fs.h"
-#include "../libsvn_fs_fs/index.h"
-#include "../libsvn_fs_fs/rev_file.h"
-#include "../libsvn_fs_fs/util.h"
-#include "../libsvn_fs/fs-loader.h"
+#include "private/svn_fs_fs_private.h"
 
 #include "svnfsfs.h"
 
@@ -50,6 +47,28 @@ fnv1_to_string(apr_uint32_t fnv1,
 static const char *item_type_str[]
   = {"none ", "frep ", "drep ", "fprop", "dprop", "node ", "chgs ", "rep  "};
 
+/* Implements svn_fs_fs__dump_index_func_t as printing one table row
+ * containing the fields of ENTRY to the console.
+ */
+static svn_error_t *
+dump_index_entry(const svn_fs_fs__p2l_entry_t *entry,
+                 void *baton,
+                 apr_pool_t *scratch_pool)
+{
+  const char *type_str
+    = entry->type < (sizeof(item_type_str) / sizeof(item_type_str[0]))
+    ? item_type_str[entry->type]
+    : "???";
+
+  printf("%12" APR_UINT64_T_HEX_FMT " %12" APR_UINT64_T_HEX_FMT
+         " %s %9ld %8" APR_UINT64_T_FMT " %s\n",
+         (apr_uint64_t)entry->offset, (apr_uint64_t)entry->size,
+         type_str, entry->item.revision, entry->item.number,
+         fnv1_to_string(entry->fnv1_checksum, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
 /* Read the repository at PATH beginning with revision START_REVISION and
  * return the result in *FS.  Allocate caches with MEMSIZE bytes total
  * capacity.  Use POOL for non-cache allocations.
@@ -59,65 +78,17 @@ dump_index(const char *path,
            svn_revnum_t revision,
            apr_pool_t *pool)
 {
-  svn_fs_fs__revision_file_t *rev_file;
   svn_fs_t *fs;
-  fs_fs_data_t *ffd;
-  int i;
-  apr_off_t offset, max_offset;
-  apr_pool_t *iterpool = svn_pool_create(pool);
 
   /* Check repository type and open it. */
   SVN_ERR(open_fs(&fs, path, pool));
-  ffd = fs->fsap_data;
-
-  /* Check the FS format. */
-  if (! svn_fs_fs__use_log_addressing(fs, revision))
-    return svn_error_create(SVN_ERR_FS_UNSUPPORTED_FORMAT, NULL, NULL);
-
-  /* Revision & index file access object. */
-  SVN_ERR(svn_fs_fs__open_pack_or_rev_file(&rev_file, fs, revision, pool,
-                                           iterpool));
-
-  /* Offset range to cover. */
-  SVN_ERR(svn_fs_fs__p2l_get_max_offset(&max_offset, fs, rev_file, revision,
-                                        pool));
 
   /* Write header line. */
   printf("       Start       Length Type   Revision     Item Checksum\n");
 
-  /* Walk through all P2L index entries in offset order. */
-  for (offset = 0; offset < max_offset; )
-    {
-      apr_array_header_t *entries;
-
-      /* Read entries for the next block.  There will be no overlaps since
-       * we start at the first offset not covered. */
-      svn_pool_clear(iterpool);
-      SVN_ERR(svn_fs_fs__p2l_index_lookup(&entries, fs, rev_file, revision,
-                                          offset, ffd->p2l_page_size,
-                                          iterpool));
-
-      /* Print entries for this block, one line per entry. */
-      for (i = 0; i < entries->nelts && offset < max_offset; ++i)
-        {
-          const svn_fs_fs__p2l_entry_t *entry
-            = &APR_ARRAY_IDX(entries, i, const svn_fs_fs__p2l_entry_t);
-          const char *type_str
-            = entry->type < (sizeof(item_type_str) / sizeof(item_type_str[0]))
-            ? item_type_str[entry->type]
-            : "???";
-
-          offset = entry->offset + entry->size;
-
-          printf("%12" APR_UINT64_T_HEX_FMT " %12" APR_UINT64_T_HEX_FMT
-                 " %s %9ld %8" APR_UINT64_T_FMT " %s\n",
-                 (apr_uint64_t)entry->offset, (apr_uint64_t)entry->size,
-                 type_str, entry->item.revision, entry->item.number,
-                 fnv1_to_string(entry->fnv1_checksum, iterpool));
-        }
-    }
-
-  svn_pool_destroy(iterpool);
+  /* Dump the whole index contents */
+  SVN_ERR(svn_fs_fs__dump_index(fs, revision, dump_index_entry, NULL,
+                                check_cancel, NULL, pool));
 
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/authzperf/subversion/svnfsfs/load-index-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/authzperf/subversion/svnfsfs/load-index-cmd.c?rev=1649205&r1=1649204&r2=1649205&view=diff
==============================================================================
--- subversion/branches/authzperf/subversion/svnfsfs/load-index-cmd.c (original)
+++ subversion/branches/authzperf/subversion/svnfsfs/load-index-cmd.c Sat Jan  3 14:00:41 2015
@@ -25,12 +25,9 @@
 #include "svn_io.h"
 #include "svn_pools.h"
 
+#include "private/svn_fs_fs_private.h"
 #include "private/svn_sorts_private.h"
 
-#include "../libsvn_fs_fs/index.h"
-#include "../libsvn_fs_fs/transaction.h"
-#include "../libsvn_fs_fs/util.h"
-
 #include "svn_private_config.h"
 
 #include "svnfsfs.h"
@@ -168,45 +165,11 @@ load_index(const char *path,
        * Get a revision from (probably inside) the respective shard. */
       if (   revision == SVN_INVALID_REVNUM
           && entry->item.revision != SVN_INVALID_REVNUM)
-        {
-          revision = entry->item.revision;
-
-          /* Check the FS format number. */
-          if (! svn_fs_fs__use_log_addressing(fs, revision))
-            return svn_error_create(SVN_ERR_FS_UNSUPPORTED_FORMAT, NULL, NULL);
-        }
-
-    }
-
-  /* Treat an empty array as a no-op instead error. */
-  if (entries->nelts != 0)
-    {
-      const char *l2p_proto_index;
-      const char *p2l_proto_index;
-      svn_fs_fs__revision_file_t *rev_file;
-
-      /* Open rev / pack file & trim indexes + footer off it. */
-      SVN_ERR(svn_fs_fs__open_pack_or_rev_file_writable(&rev_file, fs,
-                                                        revision, iterpool,
-                                                        iterpool));
-      SVN_ERR(svn_fs_fs__auto_read_footer(rev_file));
-      SVN_ERR(svn_io_file_trunc(rev_file->file, rev_file->l2p_offset,
-                                iterpool));
-
-      /* Create proto index files for the new index data
-       * (will be cleaned up automatically with iterpool). */
-      SVN_ERR(svn_fs_fs__p2l_index_from_p2l_entries(&p2l_proto_index, fs,
-                                                    rev_file, entries,
-                                                    iterpool, iterpool));
-      SVN_ERR(svn_fs_fs__l2p_index_from_p2l_entries(&l2p_proto_index, fs,
-                                                    entries, iterpool,
-                                                    iterpool));
-
-      /* Combine rev data with new index data. */
-      SVN_ERR(svn_fs_fs__add_index_data(fs, rev_file->file, l2p_proto_index,
-                                        p2l_proto_index, revision, iterpool));
+        revision = entry->item.revision;
     }
 
+  /* Rewrite the indexes. */
+  SVN_ERR(svn_fs_fs__load_index(fs, revision, entries, iterpool));
   svn_pool_destroy(iterpool);
 
   return SVN_NO_ERROR;