subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1687045 [19/31] - in /subversion/branches/svn-mergeinfo-normalizer: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ doc/ subversion/bindings/javahl/ subversion/bindings/javahl/native/ subversion/bindings/javahl/nativ...
Date Tue, 23 Jun 2015 12:55:47 GMT
Modified: subversion/branches/svn-mergeinfo-normalizer/subversion/svn/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/subversion/svn/props.c?rev=1687045&r1=1687044&r2=1687045&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/subversion/svn/props.c (original)
+++ subversion/branches/svn-mergeinfo-normalizer/subversion/svn/props.c Tue Jun 23 12:55:43 2015
@@ -112,59 +112,6 @@ svn_cl__check_boolean_prop_val(const cha
     }
 }
 
-
-/* Context for sorting property names */
-struct simprop_context_t
-{
-  svn_string_t name;    /* The name of the property we're comparing with */
-  svn_membuf_t buffer;  /* Buffer for similarity testing */
-};
-
-struct simprop_t
-{
-  const char *propname; /* The original svn: property name */
-  svn_string_t name;    /* The property name without the svn: prefix */
-  unsigned int score;   /* The similarity score */
-  apr_size_t diff;      /* Number of chars different from context.name */
-  struct simprop_context_t *context; /* Sorting context for qsort() */
-};
-
-/* Similarity test between two property names */
-static APR_INLINE unsigned int
-simprop_key_diff(const svn_string_t *key, const svn_string_t *ctx,
-                 svn_membuf_t *buffer, apr_size_t *diff)
-{
-  apr_size_t lcs;
-  const unsigned int score = svn_string__similarity(key, ctx, buffer, &lcs);
-  if (key->len > ctx->len)
-    *diff = key->len - lcs;
-  else
-    *diff = ctx->len - lcs;
-  return score;
-}
-
-/* Key comparator for qsort for simprop_t */
-static int
-simprop_compare(const void *pkeya, const void *pkeyb)
-{
-  struct simprop_t *const keya = *(struct simprop_t *const *)pkeya;
-  struct simprop_t *const keyb = *(struct simprop_t *const *)pkeyb;
-  struct simprop_context_t *const context = keya->context;
-
-  if (keya->score == -1)
-    keya->score = simprop_key_diff(&keya->name, &context->name,
-                                   &context->buffer, &keya->diff);
-  if (keyb->score == -1)
-    keyb->score = simprop_key_diff(&keyb->name, &context->name,
-                                   &context->buffer, &keyb->diff);
-
-  return (keya->score < keyb->score ? 1
-          : (keya->score > keyb->score ? -1
-             : (keya->diff > keyb->diff ? 1
-                : (keya->diff < keyb->diff ? -1 : 0))));
-}
-
-
 static const char*
 force_prop_option_message(svn_cl__prop_use_t prop_use, const char *prop_name,
                           apr_pool_t *scratch_pool)
@@ -174,18 +121,18 @@ force_prop_option_message(svn_cl__prop_u
     case svn_cl__prop_use_set:
       return apr_psprintf(
           scratch_pool,
-          _("(To set the '%s' property, re-run with '--force'.)"),
+          _("Use '--force' to set the '%s' property."),
           prop_name);
     case svn_cl__prop_use_edit:
       return apr_psprintf(
           scratch_pool,
-          _("(To edit the '%s' property, re-run with '--force'.)"),
+          _("Use '--force' to edit the '%s' property."),
           prop_name);
     case svn_cl__prop_use_use:
     default:
       return apr_psprintf(
           scratch_pool,
-          _("(To use the '%s' property, re-run with '--force'.)"),
+          _("Use '--force' to use the '%s' property'."),
           prop_name);
     }
 }
@@ -199,21 +146,18 @@ wrong_prop_error_message(svn_cl__prop_us
     case svn_cl__prop_use_set:
       return apr_psprintf(
           scratch_pool,
-          _("'%s' is not a valid %s property name;"
-            " re-run with '--force' to set it"),
+          _("'%s' is not a valid %s property name; use '--force' to set it"),
           prop_name, SVN_PROP_PREFIX);
     case svn_cl__prop_use_edit:
       return apr_psprintf(
           scratch_pool,
-          _("'%s' is not a valid %s property name;"
-            " re-run with '--force' to edit it"),
+          _("'%s' is not a valid %s property name; use '--force' to edit it"),
           prop_name, SVN_PROP_PREFIX);
     case svn_cl__prop_use_use:
     default:
       return apr_psprintf(
           scratch_pool,
-          _("'%s' is not a valid %s property name;"
-            " re-run with '--force' to use it"),
+          _("'%s' is not a valid %s property name; use '--force' to use it"),
           prop_name, SVN_PROP_PREFIX);
     }
 }
@@ -239,33 +183,34 @@ svn_cl__check_svn_prop_name(const char *
   const char *const *const proplist = (revprop ? revprops : nodeprops);
   const apr_size_t numprops = (revprop ? revprops_len : nodeprops_len);
 
-  struct simprop_t **propkeys;
-  struct simprop_t *propbuf;
+  svn_cl__simcheck_t **propkeys;
+  svn_cl__simcheck_t *propbuf;
   apr_size_t i;
 
-  struct simprop_context_t context;
+  svn_string_t propstring;
   svn_string_t prefix;
+  svn_membuf_t buffer;
 
-  context.name.data = propname;
-  context.name.len = strlen(propname);
+  propstring.data = propname;
+  propstring.len = strlen(propname);
   prefix.data = SVN_PROP_PREFIX;
   prefix.len = strlen(SVN_PROP_PREFIX);
 
-  svn_membuf__create(&context.buffer, 0, scratch_pool);
+  svn_membuf__create(&buffer, 0, scratch_pool);
 
   /* First, check if the name is even close to being in the svn: namespace.
      It must contain a colon in the right place, and we only allow
      one-char typos or a single transposition. */
-  if (context.name.len < prefix.len
-      || context.name.data[prefix.len - 1] != prefix.data[prefix.len - 1])
+  if (propstring.len < prefix.len
+      || propstring.data[prefix.len - 1] != prefix.data[prefix.len - 1])
     return SVN_NO_ERROR;        /* Wrong prefix, ignore */
   else
     {
       apr_size_t lcs;
-      const apr_size_t name_len = context.name.len;
-      context.name.len = prefix.len; /* Only check up to the prefix length */
-      svn_string__similarity(&context.name, &prefix, &context.buffer, &lcs);
-      context.name.len = name_len; /* Restore the original propname length */
+      const apr_size_t name_len = propstring.len;
+      propstring.len = prefix.len; /* Only check up to the prefix length */
+      svn_string__similarity(&propstring, &prefix, &buffer, &lcs);
+      propstring.len = name_len; /* Restore the original propname length */
       if (lcs < prefix.len - 1)
         return SVN_NO_ERROR;    /* Wrong prefix, ignore */
 
@@ -276,11 +221,11 @@ svn_cl__check_svn_prop_name(const char *
           for (i = 0; i < numprops; ++i)
             {
               if (0 == strcmp(proplist[i] + prefix.len, propname + prefix.len))
-                return svn_error_createf(
+                return svn_error_quick_wrap(svn_error_createf(
                   SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
                   _("'%s' is not a valid %s property name;"
-                    " did you mean '%s'?\n%s"),
-                  propname, SVN_PROP_PREFIX, proplist[i],
+                    " did you mean '%s'?"),
+                  propname, SVN_PROP_PREFIX, proplist[i]),
                   force_prop_option_message(prop_use, propname, scratch_pool));
             }
           return SVN_NO_ERROR;
@@ -292,65 +237,59 @@ svn_cl__check_svn_prop_name(const char *
      we already know that it's the same and looking at it would only
      skew the results. */
   propkeys = apr_palloc(scratch_pool,
-                        numprops * sizeof(struct simprop_t*));
+                        numprops * sizeof(svn_cl__simcheck_t*));
   propbuf = apr_palloc(scratch_pool,
-                       numprops * sizeof(struct simprop_t));
-  context.name.data += prefix.len;
-  context.name.len -= prefix.len;
+                       numprops * sizeof(svn_cl__simcheck_t));
+  propstring.data += prefix.len;
+  propstring.len -= prefix.len;
   for (i = 0; i < numprops; ++i)
     {
       propkeys[i] = &propbuf[i];
-      propbuf[i].propname = proplist[i];
-      propbuf[i].name.data = proplist[i] + prefix.len;
-      propbuf[i].name.len = strlen(propbuf[i].name.data);
-      propbuf[i].score = (unsigned int)-1;
-      propbuf[i].context = &context;
+      propbuf[i].token.data = proplist[i] + prefix.len;
+      propbuf[i].token.len = strlen(propbuf[i].token.data);
+      propbuf[i].data = proplist[i];
     }
 
-  qsort(propkeys, numprops, sizeof(*propkeys), simprop_compare);
-
-  if (0 == propkeys[0]->diff)
-    return SVN_NO_ERROR;        /* We found an exact match. */
-
-  /* See if we can suggest a sane alternative spelling */
-  for (i = 0; i < numprops; ++i)
-    if (propkeys[i]->score < 666) /* 2/3 similarity required */
-      break;
-
-  switch (i)
+  switch (svn_cl__similarity_check(
+              propstring.data, propkeys, numprops, scratch_pool))
     {
     case 0:
+      return SVN_NO_ERROR;      /* We found an exact match. */
+
+    case 1:
       /* The best alternative isn't good enough */
       return svn_error_create(
         SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
         wrong_prop_error_message(prop_use, propname, scratch_pool));
 
-    case 1:
+    case 2:
       /* There is only one good candidate */
-      return svn_error_createf(
+      return svn_error_quick_wrap(svn_error_createf(
         SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
-        _("'%s' is not a valid %s property name; did you mean '%s'?\n%s"),
-        propname, SVN_PROP_PREFIX, propkeys[0]->propname,
+        _("'%s' is not a valid %s property name; did you mean '%s'?"),
+        propname, SVN_PROP_PREFIX,
+        (const char *)propkeys[0]->data),
         force_prop_option_message(prop_use, propname, scratch_pool));
 
-    case 2:
+    case 3:
       /* Suggest a list of the most likely candidates */
-      return svn_error_createf(
+      return svn_error_quick_wrap(svn_error_createf(
         SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
-        _("'%s' is not a valid %s property name\n"
-          "Did you mean '%s' or '%s'?\n%s"),
+        _("'%s' is not a valid %s property name; "
+          "did you mean '%s' or '%s'?"),
         propname, SVN_PROP_PREFIX,
-        propkeys[0]->propname, propkeys[1]->propname,
+        (const char *)propkeys[0]->data, (const char *)propkeys[1]->data),
         force_prop_option_message(prop_use, propname, scratch_pool));
 
     default:
       /* Never suggest more than three candidates */
-      return svn_error_createf(
+      return svn_error_quick_wrap(svn_error_createf(
         SVN_ERR_CLIENT_PROPERTY_NAME, NULL,
-        _("'%s' is not a valid %s property name\n"
-          "Did you mean '%s', '%s' or '%s'?\n%s"),
+        _("'%s' is not a valid %s property name; "
+          "did you mean '%s', '%s' or '%s'?"),
         propname, SVN_PROP_PREFIX,
-        propkeys[0]->propname, propkeys[1]->propname, propkeys[2]->propname,
+        (const char *)propkeys[0]->data,
+        (const char *)propkeys[1]->data, (const char *)propkeys[2]->data),
         force_prop_option_message(prop_use, propname, scratch_pool));
     }
 }

Modified: subversion/branches/svn-mergeinfo-normalizer/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/subversion/svn/status-cmd.c?rev=1687045&r1=1687044&r2=1687045&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/subversion/svn/status-cmd.c (original)
+++ subversion/branches/svn-mergeinfo-normalizer/subversion/svn/status-cmd.c Tue Jun 23 12:55:43 2015
@@ -288,8 +288,15 @@ svn_cl__status(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__check_targets_are_local_paths(targets));
 
-  /* We want our -u statuses to be against HEAD. */
-  rev.kind = svn_opt_revision_head;
+  /* We want our -u statuses to be against HEAD by default. */
+  if (opt_state->start_revision.kind == svn_opt_revision_unspecified)
+    rev.kind = svn_opt_revision_head;
+  else if (! opt_state->update)
+    return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                        _("--revision (-r) option valid only with "
+                          "--show-updates (-u) option"));
+  else
+    rev = opt_state->start_revision;
 
   sb.had_print_error = FALSE;
 

Modified: subversion/branches/svn-mergeinfo-normalizer/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/subversion/svn/svn.c?rev=1687045&r1=1687044&r2=1687045&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/subversion/svn/svn.c (original)
+++ subversion/branches/svn-mergeinfo-normalizer/subversion/svn/svn.c Tue Jun 23 12:55:43 2015
@@ -110,7 +110,7 @@ typedef enum svn_cl__longopt_t {
   opt_remove,
   opt_revprop,
   opt_stop_on_copy,
-  opt_strict,
+  opt_strict,                   /* ### DEPRECATED */
   opt_targets,
   opt_depth,
   opt_set_depth,
@@ -125,11 +125,7 @@ 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_trust_server_cert_failures,
   opt_strip,
   opt_ignore_keywords,
   opt_reverse_diff,
@@ -146,6 +142,7 @@ typedef enum svn_cl__longopt_t {
   opt_no_newline,
   opt_show_passwords,
   opt_pin_externals,
+  opt_show_item,
 } svn_cl__longopt_t;
 
 
@@ -232,7 +229,7 @@ const apr_getopt_option_t svn_cl__option
                        "                             "
                        "'empty', 'files', 'immediates', or 'infinity')")},
   {"xml",           opt_xml, 0, N_("output in XML")},
-  {"strict",        opt_strict, 0, N_("use strict semantics")},
+  {"strict",        opt_strict, 0, N_("DEPRECATED")},
   {"stop-on-copy",  opt_stop_on_copy, 0,
                     N_("do not cross copies while traversing history")},
   {"no-ignore",     opt_no_ignore, 0,
@@ -242,29 +239,23 @@ 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_("deprecated; same as --trust-unknown-ca")},
-  {"trust-unknown-ca", opt_trust_server_cert_unknown_ca, 0,
-                    N_("with --non-interactive, accept SSL server\n"
+                    N_("deprecated; same as\n"
                        "                             "
-                       "certificates from unknown certificate authorities")},
-  {"trust-cn-mismatch", opt_trust_server_cert_cn_mismatch, 0,
+                       "--trust-server-cert-failures=unknown-ca")},
+  {"trust-server-cert-failures", opt_trust_server_cert_failures, 1,
                     N_("with --non-interactive, accept SSL server\n"
                        "                             "
-                       "certificates even if the server hostname does not\n"
+                       "certificates with failures; ARG is comma-separated\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"
+                       "list of 'unknown-ca' (Unknown Authority),\n"
                        "                             "
-                       "certificates")},
-  {"trust-not-yet-valid", opt_trust_server_cert_not_yet_valid, 0,
-                    N_("with --non-interactive, accept SSL server\n"
+                       "'cn-mismatch' (Hostname mismatch), 'expired'\n"
                        "                             "
-                       "certificates from the future")},
-  {"trust-other-failure", opt_trust_server_cert_other_failure, 0,
-                    N_("with --non-interactive, accept SSL server\n"
+                       "(Expired certificate), 'not-yet-valid' (Not yet\n"
                        "                             "
-                       "certificates with failures other than the above")},
+                       "valid certificate) and 'other' (all other not\n"
+                       "                             "
+                       "separately classified certificate errors).")},
   {"non-interactive", opt_non_interactive, 0,
                     N_("do no interactive prompting (default is to prompt\n"
                        "                             "
@@ -407,7 +398,7 @@ const apr_getopt_option_t svn_cl__option
                        "                             "
                        "svn:externals properties")},
   {"show-inherited-props", opt_show_inherited_props, 0,
-                       N_("retrieve target's inherited properties")},
+                       N_("retrieve properties set on parents of the target")},
   {"search", opt_search, 1,
                        N_("use ARG as search pattern (glob syntax)")},
   {"search-and", opt_search_and, 1,
@@ -423,6 +414,8 @@ const apr_getopt_option_t svn_cl__option
                        N_("pin externals with no explicit revision to their\n"
                           "                             "
                           "current revision (recommended when tagging)")},
+  {"show-item", opt_show_item, 1,
+                       N_("print only the item identified by ARG")},
 
   /* Long-opt Aliases
    *
@@ -456,9 +449,7 @@ const apr_getopt_option_t svn_cl__option
 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_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_trust_server_cert_failures,
   opt_config_dir, opt_config_options, 0
 };
 
@@ -736,9 +727,24 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "\n"
      "  Print information about each TARGET (default: '.').\n"
      "  TARGET may be either a working-copy path or URL.  If specified, REV\n"
-     "  determines in which revision the target is first looked up.\n"),
+     "  determines in which revision the target is first looked up.\n"
+     "\n"
+     "  With --show-item, print only the value of one item of information\n"
+     "  about TARGET. One of the following items can be selected:\n"
+     "     kind                  the kind of TARGET\n"
+     "     url                   the URL of TARGET in the repository\n"
+     "     relative-url          the repository-relative URL\n"
+     "     repos-root-url        the repository root URL\n"
+     "     repos-uuid            the repository UUID\n"
+     "     revision              the revision of TARGET (defaults to BASE\n"
+     "                           for working copy paths and HEAD for URLs)\n"
+     "     last-changed-revision the most recent revision in which TARGET\n"
+     "                           was changed\n"
+     "     last-changed-date     the date of the last-changed revision\n"
+     "     last-changed-author   the author of the last-changed revision\n"
+     "     wc-root               the root of TARGET's working copy"),
     {'r', 'R', opt_depth, opt_targets, opt_incremental, opt_xml,
-     opt_changelist, opt_include_externals}
+     opt_changelist, opt_include_externals, opt_show_item, opt_no_newline}
   },
 
   { "list", svn_cl__list, {"ls"}, N_
@@ -1355,14 +1361,14 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "\n"
      "  By default, an extra newline is printed after the property value so that\n"
      "  the output looks pretty.  With a single TARGET, depth 'empty' and without\n"
-     "  --show-inherited-props, you can use the --strict option to disable this\n"
+     "  --show-inherited-props, you can use the --no-newline option to disable this\n"
      "  (useful when redirecting a binary property value to a file, for example).\n"
      "\n"
      "  See 'svn help propset' for descriptions of the svn:* special properties.\n"),
-    {'v', 'R', opt_depth, 'r', opt_revprop, opt_strict, opt_xml,
+    {'v', 'R', opt_depth, 'r', opt_revprop, opt_strict, opt_no_newline, opt_xml,
      opt_changelist, opt_show_inherited_props },
     {{'v', N_("print path, name and value on separate lines")},
-     {opt_strict, N_("don't print an extra newline")}} },
+     {opt_strict, N_("(deprecated; use --no-newline)")}} },
 
   { "proplist", svn_cl__proplist, {"plist", "pl"}, N_
     ("List all properties on files, dirs, or revisions.\n"
@@ -1439,6 +1445,13 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  directory:\n"
      "    svn:ignore         - A list of file glob patterns to ignore, one per line.\n"
      "    svn:global-ignores - Like svn:ignore, but inheritable.\n"
+     "    svn:auto-props     - Automatically set properties on files when they are\n"
+     "      added or imported. Contains key-value pairs, one per line, in the format:\n"
+     "        PATTERN = PROPNAME=VALUE[;PROPNAME=VALUE ...]\n"
+     "      Example (where a literal ';' is escaped by adding another ';'):\n"
+     "        *.html = svn:eol-style=native;svn:mime-type=text/html;; charset=UTF8\n"
+     "      Applies recursively to all files added or imported under the directory\n"
+     "      it is set on.  See also [auto-props] in the client configuration file.\n"
      "    svn:externals      - A list of module specifiers, one per line, in the\n"
      "      following format similar to the syntax of 'svn checkout':\n"
      "        [-r REV] URL[@PEG] LOCALPATH\n"
@@ -1620,8 +1633,8 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "    !     C wc/qaz.c\n"
      "          >   local missing, incoming edit upon update\n"
      "    D       wc/qax.c\n"),
-    { 'u', 'v', 'N', opt_depth, 'q', opt_no_ignore, opt_incremental, opt_xml,
-      opt_ignore_externals, opt_changelist},
+    { 'u', 'v', 'N', opt_depth, 'r', 'q', opt_no_ignore, opt_incremental,
+      opt_xml, opt_ignore_externals, opt_changelist},
     {{'q', N_("don't print unversioned items")}} },
 
   { "switch", svn_cl__switch, {"sw"}, N_
@@ -2154,9 +2167,6 @@ sub_main(int *exit_code, int argc, const
       case opt_stop_on_copy:
         opt_state.stop_on_copy = TRUE;
         break;
-      case opt_strict:
-        opt_state.strict = TRUE;
-        break;
       case opt_no_ignore:
         opt_state.no_ignore = TRUE;
         break;
@@ -2170,20 +2180,17 @@ sub_main(int *exit_code, int argc, const
         force_interactive = TRUE;
         break;
       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;
+      case opt_trust_server_cert_failures:
+        SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+        SVN_ERR(svn_cmdline__parse_trust_options(
+                      &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,
+                      utf8_opt_arg, pool));
         break;
       case opt_no_diff_added:
         opt_state.diff.no_diff_added = TRUE;
@@ -2250,7 +2257,7 @@ sub_main(int *exit_code, int argc, const
 
         SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
         SVN_ERR(svn_cmdline__parse_config_option(opt_state.config_options,
-                                                 utf8_opt_arg, pool));
+                                                 utf8_opt_arg, "svn: ", pool));
         break;
       case opt_autoprops:
         opt_state.autoprops = TRUE;
@@ -2398,6 +2405,7 @@ sub_main(int *exit_code, int argc, const
         opt_state.remove_ignored = TRUE;
         break;
       case opt_no_newline:
+      case opt_strict:          /* ### DEPRECATED */
         opt_state.no_newline = TRUE;
         break;
       case opt_show_passwords:
@@ -2406,6 +2414,10 @@ sub_main(int *exit_code, int argc, const
       case opt_pin_externals:
         opt_state.pin_externals = TRUE;
         break;
+      case opt_show_item:
+        SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+        opt_state.show_item = utf8_opt_arg;
+        break;
       default:
         /* Hmmm. Perhaps this would be a good place to squirrel away
            opts that commands like svn diff might need. Hmmm indeed. */
@@ -2615,25 +2627,13 @@ sub_main(int *exit_code, int argc, const
   /* --trust-* options can only be used with --non-interactive */
   if (!opt_state.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)
+      if (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)
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--trust-other-failure requires "
+                                _("--trust-server-cert-failures requires "
                                   "--non-interactive"));
     }
 
@@ -3038,10 +3038,9 @@ sub_main(int *exit_code, int argc, const
       if (err->apr_err == SVN_ERR_CL_INSUFFICIENT_ARGS
           || err->apr_err == SVN_ERR_CL_ARG_PARSING_ERROR)
         {
-          err = svn_error_quick_wrap(
-                  err, apr_psprintf(pool,
-                                    _("Try 'svn help %s' for more information"),
-                                    subcommand->name));
+          err = svn_error_quick_wrapf(
+                  err, _("Try 'svn help %s' for more information"),
+                  subcommand->name);
         }
       if (err->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED)
         {

Modified: subversion/branches/svn-mergeinfo-normalizer/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/subversion/svnadmin/svnadmin.c?rev=1687045&r1=1687044&r2=1687045&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/svn-mergeinfo-normalizer/subversion/svnadmin/svnadmin.c Tue Jun 23 12:55:43 2015
@@ -868,6 +868,14 @@ 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;
+
   /* List of errors encountered during 'svnadmin verify --keep-going'. */
   apr_array_header_t *error_summary;
 
@@ -886,6 +894,14 @@ repos_notify_handler(void *baton,
   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;
+
   switch (notify->action)
   {
     case svn_repos_notify_warning:
@@ -901,8 +917,10 @@ repos_notify_handler(void *baton,
                                     notify->revision));
       if (notify->err)
         {
-          svn_handle_error2(notify->err, stderr, FALSE /* non-fatal */,
-                            "svnadmin: ");
+          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;
@@ -1787,6 +1805,8 @@ subcommand_verify(apr_getopt_t *os, void
   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;
 
   /* Expect no more arguments. */
@@ -1831,26 +1851,42 @@ subcommand_verify(apr_getopt_t *os, void
       upper = lower;
     }
 
-  if (! opt_state->quiet)
-    notify_baton.feedback_stream = recode_stream_create(stdout, pool);
+  /* 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->keep_going)
-    notify_baton.error_summary =
-      apr_array_make(pool, 0, sizeof(struct verification_error *));
+      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;
+      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,
-                                    !opt_state->quiet
-                                    ? repos_notify_handler : NULL,
-                                    &notify_baton, check_cancel,
-                                    NULL, pool);
+                                    notify_func, notify_baton_p,
+                                    check_cancel, NULL, pool);
 
   /* Show the --keep-going error summary. */
-  if (opt_state->keep_going && notify_baton.error_summary->nelts > 0)
+  if (!opt_state->quiet
+      && opt_state->keep_going
+      && notify_baton.error_summary->nelts > 0)
     {
       int rev_maxlength;
       svn_revnum_t end_revnum;
@@ -2510,6 +2546,7 @@ sub_main(int *exit_code, int argc, const
         SVN_ERR(svn_stringbuf_from_file2(&(opt_state.filedata),
                                              utf8_opt_arg, pool));
         dash_F_arg = TRUE;
+        break;
       case svnadmin__version:
         opt_state.version = TRUE;
         break;

Modified: subversion/branches/svn-mergeinfo-normalizer/subversion/svnbench/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/subversion/svnbench/cl.h?rev=1687045&r1=1687044&r2=1687045&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/subversion/svnbench/cl.h (original)
+++ subversion/branches/svn-mergeinfo-normalizer/subversion/svnbench/cl.h Tue Jun 23 12:55:43 2015
@@ -80,7 +80,6 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t help;            /* print usage message */
   const char *auth_username;     /* auth username */ /* UTF-8! */
   const char *auth_password;     /* auth password */ /* UTF-8! */
-  const char *extensions;        /* subprocess extension args */ /* UTF-8! */
   apr_array_header_t *targets;   /* target list from file */ /* UTF-8! */
   svn_boolean_t no_auth_cache;   /* do not cache authentication information */
   svn_boolean_t stop_on_copy;    /* don't cross copies during processing */
@@ -109,6 +108,7 @@ typedef struct svn_cl__cmd_baton_t
 /* Declare all the command procedures */
 svn_opt_subcommand_t
   svn_cl__help,
+  svn_cl__null_blame,
   svn_cl__null_export,
   svn_cl__null_list,
   svn_cl__null_log,

Modified: subversion/branches/svn-mergeinfo-normalizer/subversion/svnbench/svnbench.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/subversion/svnbench/svnbench.c?rev=1687045&r1=1687044&r2=1687045&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/subversion/svnbench/svnbench.c (original)
+++ subversion/branches/svn-mergeinfo-normalizer/subversion/svnbench/svnbench.c Tue Jun 23 12:55:43 2015
@@ -67,11 +67,7 @@ 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_trust_server_cert_failures,
   opt_changelist
 } svn_cl__longopt_t;
 
@@ -127,29 +123,23 @@ 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_("deprecated; same as --trust-unknown-ca")},
-  {"trust-unknown-ca", opt_trust_server_cert_unknown_ca, 0,
-                    N_("with --non-interactive, accept SSL server\n"
+                    N_("deprecated; same as\n"
                        "                             "
-                       "certificates from unknown certificate authorities")},
-  {"trust-cn-mismatch", opt_trust_server_cert_cn_mismatch, 0,
+                       "--trust-server-cert-failures=unknown-ca")},
+  {"trust-server-cert-failures", opt_trust_server_cert_failures, 1,
                     N_("with --non-interactive, accept SSL server\n"
                        "                             "
-                       "certificates even if the server hostname does not\n"
+                       "certificates with failures; ARG is comma-separated\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"
+                       "list of 'unknown-ca' (Unknown Authority),\n"
                        "                             "
-                       "certificates")},
-  {"trust-not-yet-valid", opt_trust_server_cert_not_yet_valid, 0,
-                    N_("with --non-interactive, accept SSL server\n"
+                       "'cn-mismatch' (Hostname mismatch), 'expired'\n"
                        "                             "
-                       "certificates from the future")},
-  {"trust-other-failure", opt_trust_server_cert_other_failure, 0,
-                    N_("with --non-interactive, accept SSL server\n"
+                       "(Expired certificate), 'not-yet-valid' (Not yet\n"
                        "                             "
-                       "certificates with failures other than the above")},
+                       "valid certificate) and 'other' (all other not\n"
+                       "                             "
+                       "separately classified certificate errors).")},
   {"non-interactive", opt_non_interactive, 0,
                     N_("do no interactive prompting")},
   {"config-dir",    opt_config_dir, 1,
@@ -205,9 +195,7 @@ 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_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_trust_server_cert, opt_trust_server_cert_failures,
   opt_config_dir, opt_config_options, 0
 };
 
@@ -219,6 +207,26 @@ const svn_opt_subcommand_desc2_t svn_cl_
     {0} },
   /* This command is also invoked if we see option "--help", "-h" or "-?". */
 
+  { "null-blame", svn_cl__null_blame, {0}, N_
+    ("Fetch all versions of a file in a batch.\n"
+     "usage: null-blame [-rM:N] TARGET[@REV]...\n"
+     "\n"
+     "  With no revision range (same as -r0:REV), or with '-r M:N' where M < N,\n"
+     "  annotate each line that is present in revision N of the file, with\n"
+     "  the last revision at or before rN that changed or added the line,\n"
+     "  looking back no further than rM.\n"
+     "\n"
+     "  With a reverse revision range '-r M:N' where M > N,\n"
+     "  annotate each line that is present in revision N of the file, with\n"
+     "  the next revision after rN that changed or deleted the line,\n"
+     "  looking forward no further than rM.\n"
+     "\n"
+     "  If specified, REV determines in which revision the target is first\n"
+     "  looked up.\n"
+     "\n"
+     "  Write the annotated result to standard output.\n"),
+    {'r', 'g'} },
+
   { "null-export", svn_cl__null_export, {0}, N_
     ("Create an unversioned copy of a tree.\n"
      "usage: null-export [-r REV] URL[@PEGREV]\n"
@@ -281,8 +289,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  follow copy history by default.  Use --stop-on-copy to disable this\n"
      "  behavior, which can be useful for determining branchpoints.\n"),
     {'r', 'q', 'v', 'g', 'c', opt_targets, opt_stop_on_copy,
-     'l', opt_with_all_revprops, opt_with_no_revprops, opt_with_revprop,
-     'x',},
+     'l', opt_with_all_revprops, opt_with_no_revprops, opt_with_revprop,},
     {{opt_with_revprop, N_("retrieve revision property ARG")},
      {'c', N_("the change made in revision ARG")}} },
 
@@ -527,10 +534,10 @@ sub_main(int *exit_code, int argc, const
                                             opt_arg, pool) != 0)
           {
             SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
-            return svn_error_createf
-                (SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                 _("Syntax error in revision argument '%s'"),
-                 utf8_opt_arg);
+            return svn_error_createf(
+                     SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                     _("Syntax error in revision argument '%s'"),
+                     utf8_opt_arg);
           }
         break;
       case 'v':
@@ -605,24 +612,17 @@ sub_main(int *exit_code, int argc, const
         opt_state.non_interactive = TRUE;
         break;
       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,
-                                            opt_arg, pool));
+      case opt_trust_server_cert_failures:
+        SVN_ERR(svn_utf_cstring_to_utf8(&utf8_opt_arg, opt_arg, pool));
+        SVN_ERR(svn_cmdline__parse_trust_options(
+                      &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,
+                      utf8_opt_arg, pool));
         break;
       case opt_config_dir:
         {
@@ -639,7 +639,7 @@ sub_main(int *exit_code, int argc, const
 
         SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool));
         SVN_ERR(svn_cmdline__parse_config_option(opt_state.config_options,
-                                                     opt_arg, pool));
+                                                 opt_arg, "svnbench: ", pool));
         break;
       case opt_with_all_revprops:
         /* If --with-all-revprops is specified along with one or more
@@ -755,9 +755,9 @@ sub_main(int *exit_code, int argc, const
           if (subcommand->name[0] == '-')
             SVN_ERR(svn_cl__help(NULL, NULL, pool));
           else
-            svn_error_clear
-              (svn_cmdline_fprintf
-               (stderr, pool, _("Subcommand '%s' doesn't accept option '%s'\n"
+            svn_error_clear(
+              svn_cmdline_fprintf(
+                stderr, pool, _("Subcommand '%s' doesn't accept option '%s'\n"
                                 "Type 'svnbench help %s' for usage.\n"),
                 subcommand->name, optstr, subcommand->name));
           *exit_code = EXIT_FAILURE;
@@ -798,25 +798,13 @@ sub_main(int *exit_code, int argc, const
   /* --trust-* options can only be used with --non-interactive */
   if (!opt_state.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)
+      if (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)
         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 "
+                                _("--trust-server-cert-failures requires "
                                   "--non-interactive"));
     }
 
@@ -842,7 +830,8 @@ sub_main(int *exit_code, int argc, const
 
   /* Only a few commands can accept a revision range; the rest can take at
      most one revision number. */
-  if (subcommand->cmd_func != svn_cl__null_log)
+  if (subcommand->cmd_func != svn_cl__null_blame
+      && subcommand->cmd_func != svn_cl__null_log)
     {
       if (opt_state.end_revision.kind != svn_opt_revision_unspecified)
         {
@@ -958,10 +947,9 @@ sub_main(int *exit_code, int argc, const
       if (err->apr_err == SVN_ERR_CL_INSUFFICIENT_ARGS
           || err->apr_err == SVN_ERR_CL_ARG_PARSING_ERROR)
         {
-          err = svn_error_quick_wrap(
-                  err, apr_psprintf(pool,
-                                    _("Try 'svnbench help %s' for more information"),
-                                    subcommand->name));
+          err = svn_error_quick_wrapf(
+                  err, _("Try 'svnbench help %s' for more information"),
+                  subcommand->name);
         }
       if (err->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED)
         {

Modified: subversion/branches/svn-mergeinfo-normalizer/subversion/svnmucc/svnmucc.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/subversion/svnmucc/svnmucc.c?rev=1687045&r1=1687044&r2=1687045&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/subversion/svnmucc/svnmucc.c (original)
+++ subversion/branches/svn-mergeinfo-normalizer/subversion/svnmucc/svnmucc.c Tue Jun 23 12:55:43 2015
@@ -295,18 +295,16 @@ help(FILE *stream, apr_pool_t *pool)
       "                           prompt only if standard input is a terminal)\n"
       "  --force-interactive    : do interactive prompting even if standard\n"
       "                           input is not a terminal\n"
-      "  --trust-server-cert    : deprecated; same as --trust-unknown-ca\n"
-      "  --trust-unknown-ca     : with --non-interactive, accept SSL server\n"
-      "                           certificates from unknown certificate authorities\n"
-      "  --trust-cn-mismatch    : with --non-interactive, accept SSL server\n"
-      "                           certificates even if the server hostname does not\n"
-      "                           match the certificate's common name attribute\n"
-      "  --trust-expired        : with --non-interactive, accept expired SSL server\n"
-      "                           certificates\n"
-      "  --trust-not-yet-valid  : with --non-interactive, accept SSL server\n"
-      "                           certificates from the future\n"
-      "  --trust-other-failure  : with --non-interactive, accept SSL server\n"
-      "                           certificates with failures other than the above\n"
+      "  --trust-server-cert    : deprecated;\n"
+      "                           same as --trust-server-cert-failures=unknown-ca\n"
+      "  --trust-server-cert-failures ARG\n"
+      "                           with --non-interactive, accept SSL server\n"
+      "                           certificates with failures; ARG is comma-separated\n"
+      "                           list of 'unknown-ca' (Unknown Authority),\n"
+      "                           'cn-mismatch' (Hostname mismatch), 'expired'\n"
+      "                           (Expired certificate),'not-yet-valid' (Not yet\n"
+      "                           valid certificate) and 'other' (all other not\n"
+      "                           separately classified certificate errors).\n"
       "  -X [--extra-args] ARG  : append arguments from file ARG (one per line;\n"
       "                           use \"-\" to read from standard input)\n"
       "  --config-dir ARG       : use ARG to override the config directory\n"
@@ -472,11 +470,7 @@ sub_main(int *exit_code, int argc, const
     non_interactive_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,
+    trust_server_cert_failures_opt,
   };
   static const apr_getopt_option_t options[] = {
     {"message", 'm', 1, ""},
@@ -492,11 +486,7 @@ sub_main(int *exit_code, int argc, const
     {"non-interactive", non_interactive_opt, 0, ""},
     {"force-interactive", force_interactive_opt, 0, ""},
     {"trust-server-cert", trust_server_cert_opt, 0, ""},
-    {"trust-unknown-ca", trust_server_cert_unknown_ca_opt, 0, ""},
-    {"trust-cn-mismatch", trust_server_cert_cn_mismatch_opt, 0, ""},
-    {"trust-expired", trust_server_cert_expired_opt, 0, ""},
-    {"trust-not-yet-valid", trust_server_cert_not_yet_valid_opt, 0, ""},
-    {"trust-other-failure", trust_server_cert_other_failure_opt, 0, ""},
+    {"trust-server-cert-failures", trust_server_cert_failures_opt, 1, ""},
     {"config-dir", config_dir_opt, 1, ""},
     {"config-option",  config_inline_opt, 1, ""},
     {"no-auth-cache",  no_auth_cache_opt, 0, ""},
@@ -604,20 +594,17 @@ sub_main(int *exit_code, int argc, const
           force_interactive = TRUE;
           break;
         case trust_server_cert_opt: /* backward compat */
-        case trust_server_cert_unknown_ca_opt:
           trust_unknown_ca = TRUE;
           break;
-        case trust_server_cert_cn_mismatch_opt:
-          trust_cn_mismatch = TRUE;
-          break;
-        case trust_server_cert_expired_opt:
-          trust_expired = TRUE;
-          break;
-        case trust_server_cert_not_yet_valid_opt:
-          trust_not_yet_valid = TRUE;
-          break;
-        case trust_server_cert_other_failure_opt:
-          trust_other_failure = TRUE;
+        case trust_server_cert_failures_opt:
+          SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, arg, pool));
+          SVN_ERR(svn_cmdline__parse_trust_options(
+                      &trust_unknown_ca,
+                      &trust_cn_mismatch,
+                      &trust_expired,
+                      &trust_not_yet_valid,
+                      &trust_other_failure,
+                      opt_arg, pool));
           break;
         case config_dir_opt:
           SVN_ERR(svn_utf_cstring_to_utf8(&config_dir, arg, pool));
@@ -625,6 +612,7 @@ sub_main(int *exit_code, int argc, const
         case config_inline_opt:
           SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, arg, pool));
           SVN_ERR(svn_cmdline__parse_config_option(config_options, opt_arg,
+                                                   "svnmucc: ", 
                                                    pool));
           break;
         case no_auth_cache_opt:
@@ -664,25 +652,10 @@ sub_main(int *exit_code, int argc, const
 
   if (!non_interactive)
     {
-      if (trust_unknown_ca)
-      return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                              _("--trust-unknown-ca requires "
-                                "--non-interactive"));
-      if (trust_cn_mismatch)
-        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--trust-cn-mismatch requires "
-                                  "--non-interactive"));
-      if (trust_expired)
-        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--trust-expired requires "
-                                  "--non-interactive"));
-      if (trust_not_yet_valid)
-        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--trust-not-yet-valid requires "
-                                  "--non-interactive"));
-      if (trust_other_failure)
+      if (trust_unknown_ca || trust_cn_mismatch || trust_expired
+          || trust_not_yet_valid || trust_other_failure)
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--trust-other-failure requires "
+                                _("--trust-server-cert-failures requires "
                                   "--non-interactive"));
     }
 

Modified: subversion/branches/svn-mergeinfo-normalizer/subversion/svnrdump/dump_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/subversion/svnrdump/dump_editor.c?rev=1687045&r1=1687044&r2=1687045&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/subversion/svnrdump/dump_editor.c (original)
+++ subversion/branches/svn-mergeinfo-normalizer/subversion/svnrdump/dump_editor.c Tue Jun 23 12:55:43 2015
@@ -879,7 +879,7 @@ close_file(void *file_baton,
 {
   struct file_baton *fb = file_baton;
   struct dump_edit_baton *eb = fb->eb;
-  apr_finfo_t *info = apr_pcalloc(pool, sizeof(apr_finfo_t));
+  svn_filesize_t text_content_length = 0;
   svn_stringbuf_t *propstring = NULL;
   svn_repos__dumpfile_headers_t *headers;
 
@@ -903,15 +903,12 @@ close_file(void *file_baton,
   /* Dump the text headers */
   if (fb->dump_text)
     {
-      apr_status_t err;
-
       /* Text-delta: true */
       svn_repos__dumpfile_header_push(
         headers, SVN_REPOS_DUMPFILE_TEXT_DELTA, "true");
 
-      err = apr_file_info_get(info, APR_FINFO_SIZE, eb->delta_file);
-      if (err)
-        SVN_ERR(svn_error_wrap_apr(err, NULL));
+      SVN_ERR(svn_io_file_size_get(&text_content_length, eb->delta_file,
+                                   pool));
 
       if (fb->base_checksum)
         /* Text-delta-base-md5: */
@@ -925,7 +922,7 @@ close_file(void *file_baton,
 
   /* Dump the headers and props now */
   SVN_ERR(svn_repos__dump_node_record(eb->stream, headers, propstring,
-                                      fb->dump_text, info->size,
+                                      fb->dump_text, text_content_length,
                                       FALSE /*content_length_always*/,
                                       pool));
 

Modified: subversion/branches/svn-mergeinfo-normalizer/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/subversion/svnrdump/load_editor.c?rev=1687045&r1=1687044&r2=1687045&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/subversion/svnrdump/load_editor.c (original)
+++ subversion/branches/svn-mergeinfo-normalizer/subversion/svnrdump/load_editor.c Tue Jun 23 12:55:43 2015
@@ -392,7 +392,7 @@ new_revision_record(void **revision_bato
 {
   struct revision_baton *rb;
   struct parse_baton *pb;
-  apr_hash_index_t *hi;
+  const char *rev_str;
   svn_revnum_t head_rev;
 
   rb = apr_pcalloc(pool, sizeof(*rb));
@@ -401,14 +401,9 @@ new_revision_record(void **revision_bato
   rb->pb = pb;
   rb->db = NULL;
 
-  for (hi = apr_hash_first(pool, headers); hi; hi = apr_hash_next(hi))
-    {
-      const char *hname = apr_hash_this_key(hi);
-      const char *hval = apr_hash_this_val(hi);
-
-      if (strcmp(hname, SVN_REPOS_DUMPFILE_REVISION_NUMBER) == 0)
-        rb->rev = atoi(hval);
-    }
+  rev_str = svn_hash_gets(headers, SVN_REPOS_DUMPFILE_REVISION_NUMBER);
+  if (rev_str)
+    rb->rev = SVN_STR_TO_REV(rev_str);
 
   SVN_ERR(svn_ra_get_latest_revnum(pb->session, &head_rev, pool));
 
@@ -499,6 +494,7 @@ new_node_record(void **node_baton,
   const struct svn_delta_editor_t *commit_editor = rb->pb->commit_editor;
   void *commit_edit_baton = rb->pb->commit_edit_baton;
   struct node_baton *nb;
+  svn_revnum_t head_rev_before_commit = rb->rev - rb->rev_offset - 1;
   apr_hash_index_t *hi;
   void *child_baton;
   const char *nb_dirname;
@@ -537,7 +533,7 @@ new_node_record(void **node_baton,
       rb->pb->commit_edit_baton = commit_edit_baton;
 
       SVN_ERR(commit_editor->open_root(commit_edit_baton,
-                                       rb->rev - rb->rev_offset - 1,
+                                       head_rev_before_commit,
                                        rb->pool, &child_baton));
 
       /* child_baton corresponds to the root directory baton here */
@@ -570,7 +566,7 @@ new_node_record(void **node_baton,
       if (strcmp(hname, SVN_REPOS_DUMPFILE_TEXT_DELTA_BASE_MD5) == 0)
         nb->base_checksum = apr_pstrdup(rb->pool, hval);
       if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_COPYFROM_REV) == 0)
-        nb->copyfrom_rev = atoi(hval);
+        nb->copyfrom_rev = SVN_STR_TO_REV(hval);
       if (strcmp(hname, SVN_REPOS_DUMPFILE_NODE_COPYFROM_PATH) == 0)
         nb->copyfrom_path = apr_pstrdup(rb->pool, hval);
     }
@@ -617,7 +613,7 @@ new_node_record(void **node_baton,
                              rb->pool);
           SVN_ERR(commit_editor->open_directory(relpath_compose,
                                                 rb->db->baton,
-                                                rb->rev - rb->rev_offset - 1,
+                                                head_rev_before_commit,
                                                 rb->pool, &child_baton));
           push_directory(rb, child_baton, relpath_compose, TRUE /*is_added*/,
                          NULL, SVN_INVALID_REVNUM);
@@ -659,7 +655,8 @@ new_node_record(void **node_baton,
     {
     case svn_node_action_delete:
     case svn_node_action_replace:
-      SVN_ERR(commit_editor->delete_entry(nb->path, rb->rev - rb->rev_offset,
+      SVN_ERR(commit_editor->delete_entry(nb->path,
+                                          head_rev_before_commit,
                                           rb->db->baton, rb->pool));
       if (nb->action == svn_node_action_delete)
         break;
@@ -697,7 +694,7 @@ new_node_record(void **node_baton,
           break;
         default:
           SVN_ERR(commit_editor->open_directory(nb->path, rb->db->baton,
-                                                rb->rev - rb->rev_offset - 1,
+                                                head_rev_before_commit,
                                                 rb->pool, &child_baton));
           push_directory(rb, child_baton, nb->path, FALSE /*is_added*/,
                          NULL, SVN_INVALID_REVNUM);
@@ -987,6 +984,7 @@ close_revision(void *baton)
     }
   else
     {
+      svn_revnum_t head_rev_before_commit = rb->rev - rb->rev_offset - 1;
       void *child_baton;
 
       /* Legitimate revision with no node information */
@@ -996,7 +994,7 @@ close_revision(void *baton)
                                         NULL, FALSE, rb->pool));
 
       SVN_ERR(commit_editor->open_root(commit_edit_baton,
-                                       rb->rev - rb->rev_offset - 1,
+                                       head_rev_before_commit,
                                        rb->pool, &child_baton));
 
       SVN_ERR(commit_editor->close_directory(child_baton, rb->pool));

Modified: subversion/branches/svn-mergeinfo-normalizer/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/subversion/svnrdump/svnrdump.c?rev=1687045&r1=1687044&r2=1687045&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/svn-mergeinfo-normalizer/subversion/svnrdump/svnrdump.c Tue Jun 23 12:55:43 2015
@@ -85,11 +85,7 @@ enum svn_svnrdump__longopt_t
     opt_force_interactive,
     opt_incremental,
     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_trust_server_cert_failures,
     opt_version
   };
 
@@ -99,11 +95,7 @@ enum svn_svnrdump__longopt_t
                                    opt_auth_password, \
                                    opt_auth_nocache, \
                                    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_trust_server_cert_failures, \
                                    opt_non_interactive, \
                                    opt_force_interactive
 
@@ -164,30 +156,24 @@ static const apr_getopt_option_t svnrdum
                          "For example:\n"
                          "                             "
                          "    servers:global:http-library=serf")},
-    {"trust-server-cert", opt_trust_server_cert, 0,
-                      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"
-                         "                             "
-                         "certificates from unknown certificate authorities")},
-    {"trust-cn-mismatch", opt_trust_server_cert_cn_mismatch, 0,
-                      N_("with --non-interactive, accept SSL server\n"
-                         "                             "
-                         "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")},
+  {"trust-server-cert", opt_trust_server_cert, 0,
+                    N_("deprecated; same as\n"
+                       "                             "
+                       "--trust-server-cert-failures=unknown-ca")},
+  {"trust-server-cert-failures", opt_trust_server_cert_failures, 1,
+                    N_("with --non-interactive, accept SSL server\n"
+                       "                             "
+                       "certificates with failures; ARG is comma-separated\n"
+                       "                             "
+                       "list of 'unknown-ca' (Unknown Authority),\n"
+                       "                             "
+                       "'cn-mismatch' (Hostname mismatch), 'expired'\n"
+                       "                             "
+                       "(Expired certificate), 'not-yet-valid' (Not yet\n"
+                       "                             "
+                       "valid certificate) and 'other' (all other not\n"
+                       "                             "
+                       "separately classified certificate errors).")},
     {0, 0, 0, 0}
   };
 
@@ -927,20 +913,17 @@ sub_main(int *exit_code, int argc, const
           svn_hash_sets(opt_baton->skip_revprops, opt_arg, opt_arg);
           break;
         case opt_trust_server_cert: /* backward compat */
-        case opt_trust_server_cert_unknown_ca:
           trust_unknown_ca = TRUE;
           break;
-        case opt_trust_server_cert_cn_mismatch:
-          trust_cn_mismatch = TRUE;
-          break;
-        case opt_trust_server_cert_expired:
-          trust_expired = TRUE;
-          break;
-        case opt_trust_server_cert_not_yet_valid:
-          trust_not_yet_valid = TRUE;
-          break;
-        case opt_trust_server_cert_other_failure:
-          trust_other_failure = TRUE;
+        case opt_trust_server_cert_failures:
+          SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool));
+          SVN_ERR(svn_cmdline__parse_trust_options(
+                      &trust_unknown_ca,
+                      &trust_cn_mismatch,
+                      &trust_expired,
+                      &trust_not_yet_valid,
+                      &trust_other_failure,
+                      opt_arg, pool));
           break;
         case opt_config_option:
           if (!config_options)
@@ -950,7 +933,9 @@ sub_main(int *exit_code, int argc, const
 
             SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool));
             SVN_ERR(svn_cmdline__parse_config_option(config_options,
-                                                     opt_arg, pool));
+                                                     opt_arg, 
+                                                     "svnrdump: ",
+                                                     pool));
         }
     }
 
@@ -1059,25 +1044,10 @@ sub_main(int *exit_code, int argc, const
   /* --trust-* can only be used with --non-interactive */
   if (!non_interactive)
     {
-      if (trust_unknown_ca)
-      return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                              _("--trust-unknown-ca requires "
-                                "--non-interactive"));
-      if (trust_cn_mismatch)
-        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--trust-cn-mismatch requires "
-                                  "--non-interactive"));
-      if (trust_expired)
-        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--trust-expired requires "
-                                  "--non-interactive"));
-      if (trust_not_yet_valid)
-        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--trust-not-yet-valid requires "
-                                  "--non-interactive"));
-      if (trust_other_failure)
+      if (trust_unknown_ca || trust_cn_mismatch || trust_expired
+          || trust_not_yet_valid || trust_other_failure)
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--trust-other-failure requires "
+                                _("--trust-server-cert-failures requires "
                                   "--non-interactive"));
     }
 

Modified: subversion/branches/svn-mergeinfo-normalizer/subversion/svnserve/serve.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/subversion/svnserve/serve.c?rev=1687045&r1=1687044&r2=1687045&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/subversion/svnserve/serve.c (original)
+++ subversion/branches/svn-mergeinfo-normalizer/subversion/svnserve/serve.c Tue Jun 23 12:55:43 2015
@@ -1779,12 +1779,9 @@ static svn_error_t *get_dir(svn_ra_svn_c
 
           if (dirent_fields & SVN_DIRENT_HAS_PROPS)
             {
-              apr_hash_t *file_props;
-
               /* has_props */
-              SVN_CMD_ERR(svn_fs_node_proplist(&file_props, root, file_path,
+              SVN_CMD_ERR(svn_fs_node_has_props(&has_props, root, file_path,
                                                subpool));
-              has_props = (apr_hash_count(file_props) > 0);
             }
 
           if ((dirent_fields & SVN_DIRENT_LAST_AUTHOR)
@@ -2506,32 +2503,56 @@ static svn_error_t *get_location_segment
   abs_path = svn_fspath__join(b->repository->fs_path->data, relative_path,
                               pool);
 
-  if (SVN_IS_VALID_REVNUM(start_rev)
-      && SVN_IS_VALID_REVNUM(end_rev)
-      && (end_rev > start_rev))
+  SVN_ERR(trivial_auth_request(conn, pool, b));
+  SVN_ERR(log_command(baton, conn, pool, "%s",
+                      svn_log__get_location_segments(abs_path, peg_revision,
+                                                     start_rev, end_rev,
+                                                     pool)));
+
+  /* No START_REV or PEG_REVISION?  We'll use HEAD. */
+  if (!SVN_IS_VALID_REVNUM(start_rev) || !SVN_IS_VALID_REVNUM(peg_revision))
+    {
+      svn_revnum_t youngest;
+
+      err = svn_fs_youngest_rev(&youngest, b->repository->fs, pool);
+
+      if (err)
+        {
+          err = svn_error_compose_create(
+                    svn_ra_svn__write_word(conn, pool, "done"),
+                    err);
+
+          return log_fail_and_flush(err, b, conn, pool);
+        }
+
+      if (!SVN_IS_VALID_REVNUM(start_rev))
+        start_rev = youngest;
+      if (!SVN_IS_VALID_REVNUM(peg_revision))
+        peg_revision = youngest;
+    }
+
+  /* No END_REV?  We'll use 0. */
+  if (!SVN_IS_VALID_REVNUM(end_rev))
+    end_rev = 0;
+
+  if (end_rev > start_rev)
     {
-      err = svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL,
+      err = svn_ra_svn__write_word(conn, pool, "done");
+      err = svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, err,
                               "Get-location-segments end revision must not be "
                               "younger than start revision");
       return log_fail_and_flush(err, b, conn, pool);
     }
 
-  if (SVN_IS_VALID_REVNUM(peg_revision)
-      && SVN_IS_VALID_REVNUM(start_rev)
-      && (start_rev > peg_revision))
+  if (start_rev > peg_revision)
     {
-      err = svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL,
+      err = svn_ra_svn__write_word(conn, pool, "done");
+      err = svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, err,
                               "Get-location-segments start revision must not "
                               "be younger than peg revision");
       return log_fail_and_flush(err, b, conn, pool);
     }
 
-  SVN_ERR(trivial_auth_request(conn, pool, b));
-  SVN_ERR(log_command(baton, conn, pool, "%s",
-                      svn_log__get_location_segments(abs_path, peg_revision,
-                                                     start_rev, end_rev,
-                                                     pool)));
-
   /* All the parameters are fine - let's perform the query against the
    * repository. */
 
@@ -2546,8 +2567,7 @@ static svn_error_t *get_location_segment
   write_err = svn_ra_svn__write_word(conn, pool, "done");
   if (write_err)
     {
-      svn_error_clear(err);
-      return write_err;
+      return svn_error_compose_create(write_err, err);
     }
   SVN_CMD_ERR(err);
 
@@ -3296,6 +3316,7 @@ get_inherited_props(svn_ra_svn_conn_t *c
   int i;
   apr_pool_t *iterpool = svn_pool_create(pool);
   authz_baton_t ab;
+  svn_node_kind_t node_kind;
 
   ab.server = b;
   ab.conn = conn;
@@ -3311,15 +3332,18 @@ get_inherited_props(svn_ra_svn_conn_t *c
   SVN_ERR(must_have_access(conn, iterpool, b, svn_authz_read,
                            full_path, FALSE));
 
-  if (!SVN_IS_VALID_REVNUM(rev))
-    SVN_CMD_ERR(svn_fs_youngest_rev(&rev, b->repository->fs, pool));
-
   SVN_ERR(log_command(b, conn, pool, "%s",
                       svn_log__get_inherited_props(full_path, rev,
                                                    iterpool)));
 
   /* Fetch the properties and a stream for the contents. */
   SVN_CMD_ERR(svn_fs_revision_root(&root, b->repository->fs, rev, iterpool));
+  SVN_CMD_ERR(svn_fs_check_path(&node_kind, root, full_path, pool));
+  if (node_kind == svn_node_none)
+    {
+      SVN_CMD_ERR(svn_error_createf(SVN_ERR_FS_NOT_FOUND, NULL,
+                                    _("'%s' path not found"), full_path));
+    }
   SVN_CMD_ERR(get_props(NULL, &inherited_props, &ab, root, full_path, pool));
 
   /* Send successful command response with revision and props. */

Modified: subversion/branches/svn-mergeinfo-normalizer/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/subversion/svnsync/svnsync.c?rev=1687045&r1=1687044&r2=1687045&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/subversion/svnsync/svnsync.c (original)
+++ subversion/branches/svn-mergeinfo-normalizer/subversion/svnsync/svnsync.c Tue Jun 23 12:55:43 2015
@@ -68,11 +68,8 @@ enum svnsync__opt {
   svnsync_opt_disable_locking,
   svnsync_opt_version,
   svnsync_opt_trust_server_cert,
-  svnsync_opt_trust_server_cert_unknown_ca,
-  svnsync_opt_trust_server_cert_cn_mismatch,
-  svnsync_opt_trust_server_cert_expired,
-  svnsync_opt_trust_server_cert_not_yet_valid,
-  svnsync_opt_trust_server_cert_other_failure,
+  svnsync_opt_trust_server_cert_failures_src,
+  svnsync_opt_trust_server_cert_failures_dst,
   svnsync_opt_allow_non_empty,
   svnsync_opt_steal_lock
 };
@@ -83,11 +80,8 @@ enum svnsync__opt {
                              svnsync_opt_auth_username, \
                              svnsync_opt_auth_password, \
                              svnsync_opt_trust_server_cert, \
-                             svnsync_opt_trust_server_cert_unknown_ca, \
-                             svnsync_opt_trust_server_cert_cn_mismatch, \
-                             svnsync_opt_trust_server_cert_expired, \
-                             svnsync_opt_trust_server_cert_not_yet_valid, \
-                             svnsync_opt_trust_server_cert_other_failure, \
+                             svnsync_opt_trust_server_cert_failures_src, \
+                             svnsync_opt_trust_server_cert_failures_dst, \
                              svnsync_opt_source_username, \
                              svnsync_opt_source_password, \
                              svnsync_opt_sync_username, \
@@ -204,29 +198,37 @@ static const apr_getopt_option_t svnsync
                           "                             "
                           "see --source-password and --sync-password)") },
     {"trust-server-cert", svnsync_opt_trust_server_cert, 0,
-                      N_("deprecated; same as --trust-unknown-ca")},
-    {"trust-unknown-ca", svnsync_opt_trust_server_cert_unknown_ca, 0,
-                      N_("with --non-interactive, accept SSL server\n"
+                      N_("deprecated; same as\n"
                          "                             "
-                         "certificates from unknown certificate authorities")},
-    {"trust-cn-mismatch", svnsync_opt_trust_server_cert_cn_mismatch, 0,
-                      N_("with --non-interactive, accept SSL server\n"
+                         "--source-trust-server-cert-failures=unknown-ca\n"
                          "                             "
-                         "certificates even if the server hostname does not\n"
+                         "--sync-trust-server-cert-failures=unknown-ca")},
+    {"source-trust-server-cert-failures", svnsync_opt_trust_server_cert_failures_src, 1,
+                      N_("with --non-interactive, accept SSL\n"
                          "                             "
-                         "match the certificate's common name attribute")},
-    {"trust-expired", svnsync_opt_trust_server_cert_expired, 0,
-                      N_("with --non-interactive, accept expired SSL server\n"
+                         "server certificates with failures.\n"
                          "                             "
-                         "certificates")},
-    {"trust-not-yet-valid", svnsync_opt_trust_server_cert_not_yet_valid, 0,
-                      N_("with --non-interactive, accept SSL server\n"
+                         "ARG is a comma-separated list of:\n"
                          "                             "
-                         "certificates from the future")},
-    {"trust-other-failure", svnsync_opt_trust_server_cert_other_failure, 0,
-                      N_("with --non-interactive, accept SSL server\n"
+                         "- 'unknown-ca' (Unknown Authority)\n"
                          "                             "
-                         "certificates with failures other than the above")},
+                         "- 'cn-mismatch' (Hostname mismatch)\n"
+                         "                             "
+                         "- 'expired' (Expired certificate)\n"
+                         "                             "
+                         "- 'not-yet-valid' (Not yet valid certificate)\n"
+                         "                             "
+                         "- 'other' (all other not separately classified\n"
+                         "                             "
+                         "  certificate errors).\n"
+                         "                             "
+                         "Applied to the source URL.")},
+    {"sync-trust-server-cert-failures", svnsync_opt_trust_server_cert_failures_dst, 1,
+                       N_("Like\n"
+                          "                             "
+                          "--source-trust-server-cert-failures,\n"
+                          "                             "
+                          "but applied to the destination URL.")},
     {"source-username", svnsync_opt_source_username, 1,
                        N_("connect to source repository with username ARG") },
     {"source-password", svnsync_opt_source_password, 1,
@@ -280,11 +282,13 @@ static const apr_getopt_option_t svnsync
 
 typedef struct opt_baton_t {
   svn_boolean_t non_interactive;
-  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;
+  struct { 
+    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;
+  } src_trust, dst_trust;
   svn_boolean_t no_auth_cache;
   svn_auth_baton_t *source_auth_baton;
   svn_auth_baton_t *sync_auth_baton;
@@ -2008,24 +2012,30 @@ sub_main(int *exit_code, int argc, const
             break;
 
           case svnsync_opt_trust_server_cert: /* backwards compat */
-          case svnsync_opt_trust_server_cert_unknown_ca:
-            opt_baton.trust_server_cert_unknown_ca = TRUE;
-            break;
-
-          case svnsync_opt_trust_server_cert_cn_mismatch:
-            opt_baton.trust_server_cert_cn_mismatch = TRUE;
-            break;
-
-          case svnsync_opt_trust_server_cert_expired:
-            opt_baton.trust_server_cert_expired = TRUE;
+            opt_baton.src_trust.trust_server_cert_unknown_ca = TRUE;
+            opt_baton.dst_trust.trust_server_cert_unknown_ca = TRUE;
             break;
 
-          case svnsync_opt_trust_server_cert_not_yet_valid:
-            opt_baton.trust_server_cert_not_yet_valid = TRUE;
+          case svnsync_opt_trust_server_cert_failures_src:
+            SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool));
+            SVN_ERR(svn_cmdline__parse_trust_options(
+                      &opt_baton.src_trust.trust_server_cert_unknown_ca,
+                      &opt_baton.src_trust.trust_server_cert_cn_mismatch,
+                      &opt_baton.src_trust.trust_server_cert_expired,
+                      &opt_baton.src_trust.trust_server_cert_not_yet_valid,
+                      &opt_baton.src_trust.trust_server_cert_other_failure,
+                      opt_arg, pool));
             break;
 
-          case svnsync_opt_trust_server_cert_other_failure:
-            opt_baton.trust_server_cert_other_failure = TRUE;
+          case svnsync_opt_trust_server_cert_failures_dst:
+            SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool));
+            SVN_ERR(svn_cmdline__parse_trust_options(
+                      &opt_baton.dst_trust.trust_server_cert_unknown_ca,
+                      &opt_baton.dst_trust.trust_server_cert_cn_mismatch,
+                      &opt_baton.dst_trust.trust_server_cert_expired,
+                      &opt_baton.dst_trust.trust_server_cert_not_yet_valid,
+                      &opt_baton.dst_trust.trust_server_cert_other_failure,
+                      opt_arg, pool));
             break;
 
           case svnsync_opt_no_auth_cache:
@@ -2073,7 +2083,8 @@ sub_main(int *exit_code, int argc, const
 
             SVN_ERR(svn_utf_cstring_to_utf8(&opt_arg, opt_arg, pool));
             SVN_ERR(svn_cmdline__parse_config_option(config_options,
-                                                     opt_arg, pool));
+                                                     opt_arg, "svnsync: ",
+                                                     pool));
             break;
 
           case svnsync_opt_source_prop_encoding:
@@ -2139,6 +2150,7 @@ sub_main(int *exit_code, int argc, const
                       apr_psprintf(pool,
                                    "config:miscellany:memory-cache-size=%s",
                                    opt_arg),
+                      NULL /* won't be used */,
                       pool));
             break;
 
@@ -2214,25 +2226,20 @@ sub_main(int *exit_code, int argc, const
   /* --trust-* can only be used with --non-interactive */
   if (!opt_baton.non_interactive)
     {
-      if (opt_baton.trust_server_cert_unknown_ca)
-        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--trust-unknown-ca requires "
-                                  "--non-interactive"));
-      if (opt_baton.trust_server_cert_cn_mismatch)
-        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--trust-cn-mismatch requires "
-                                  "--non-interactive"));
-      if (opt_baton.trust_server_cert_expired)
-        return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--trust-expired requires "
-                                  "--non-interactive"));
-      if (opt_baton.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_baton.trust_server_cert_other_failure)
+      if (opt_baton.src_trust.trust_server_cert_unknown_ca
+          || opt_baton.src_trust.trust_server_cert_cn_mismatch
+          || opt_baton.src_trust.trust_server_cert_expired
+          || opt_baton.src_trust.trust_server_cert_not_yet_valid
+          || opt_baton.src_trust.trust_server_cert_other_failure
+          || opt_baton.dst_trust.trust_server_cert_unknown_ca
+          || opt_baton.dst_trust.trust_server_cert_cn_mismatch
+          || opt_baton.dst_trust.trust_server_cert_expired
+          || opt_baton.dst_trust.trust_server_cert_not_yet_valid
+          || opt_baton.dst_trust.trust_server_cert_other_failure)
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("--trust-other-failure requires "
+                                _("--source-trust-server-cert-failures "
+                                  "and "
+                                  "--sync-trust-server-cert-failures require "
                                   "--non-interactive"));
     }
 
@@ -2352,11 +2359,11 @@ sub_main(int *exit_code, int argc, const
           opt_baton.source_password,
           opt_baton.config_dir,
           opt_baton.no_auth_cache,
-          opt_baton.trust_server_cert_unknown_ca,
-          opt_baton.trust_server_cert_cn_mismatch,
-          opt_baton.trust_server_cert_expired,
-          opt_baton.trust_server_cert_not_yet_valid,
-          opt_baton.trust_server_cert_other_failure,
+          opt_baton.src_trust.trust_server_cert_unknown_ca,
+          opt_baton.src_trust.trust_server_cert_cn_mismatch,
+          opt_baton.src_trust.trust_server_cert_expired,
+          opt_baton.src_trust.trust_server_cert_not_yet_valid,
+          opt_baton.src_trust.trust_server_cert_other_failure,
           config,
           check_cancel, NULL,
           pool);
@@ -2368,11 +2375,11 @@ sub_main(int *exit_code, int argc, const
             opt_baton.sync_password,
             opt_baton.config_dir,
             opt_baton.no_auth_cache,
-            opt_baton.trust_server_cert_unknown_ca,
-            opt_baton.trust_server_cert_cn_mismatch,
-            opt_baton.trust_server_cert_expired,
-            opt_baton.trust_server_cert_not_yet_valid,
-            opt_baton.trust_server_cert_other_failure,
+            opt_baton.dst_trust.trust_server_cert_unknown_ca,
+            opt_baton.dst_trust.trust_server_cert_cn_mismatch,
+            opt_baton.dst_trust.trust_server_cert_expired,
+            opt_baton.dst_trust.trust_server_cert_not_yet_valid,
+            opt_baton.dst_trust.trust_server_cert_other_failure,
             config,
             check_cancel, NULL,
             pool);

Modified: subversion/branches/svn-mergeinfo-normalizer/subversion/tests/cmdline/atomic-ra-revprop-change.c
URL: http://svn.apache.org/viewvc/subversion/branches/svn-mergeinfo-normalizer/subversion/tests/cmdline/atomic-ra-revprop-change.c?rev=1687045&r1=1687044&r2=1687045&view=diff
==============================================================================
--- subversion/branches/svn-mergeinfo-normalizer/subversion/tests/cmdline/atomic-ra-revprop-change.c (original)
+++ subversion/branches/svn-mergeinfo-normalizer/subversion/tests/cmdline/atomic-ra-revprop-change.c Tue Jun 23 12:55:43 2015
@@ -58,13 +58,14 @@ construct_auth_baton(svn_auth_baton_t **
                      const char *config_dir,
                      apr_pool_t *pool)
 {
-  SVN_ERR(svn_cmdline_create_auth_baton(auth_baton_p,
-                                        TRUE  /* non_interactive */,
-                                        "jrandom", "rayjandom",
-                                        config_dir,
-                                        TRUE  /* no_auth_cache */,
-                                        FALSE /* trust_server_cert */,
-                                        NULL, NULL, NULL, pool));
+  SVN_ERR(svn_cmdline_create_auth_baton2(auth_baton_p,
+                                         TRUE  /* non_interactive */,
+                                         "jrandom", "rayjandom",
+                                         config_dir,
+                                         TRUE  /* no_auth_cache */,
+                                         FALSE /* trust_server_cert */,
+                                         FALSE, FALSE, FALSE, FALSE,
+                                         NULL, NULL, NULL, pool));
   return SVN_NO_ERROR;
 }
 



Mime
View raw message