You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2015/06/18 12:35:33 UTC

svn commit: r1686174 [14/18] - in /subversion/branches/reuse-ra-session: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ subversion/bindings/javahl/ subversion/bindings/javahl/native/ subversion/bindings/javahl/native/jniwrapper/...

Modified: subversion/branches/reuse-ra-session/subversion/svn/auth-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svn/auth-cmd.c?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svn/auth-cmd.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svn/auth-cmd.c Thu Jun 18 10:35:30 2015
@@ -96,6 +96,39 @@ show_cert_failures(const char *failure_s
   return SVN_NO_ERROR;
 }
 
+
+/* decodes from format we store certs in for auth creds and
+ * turns parsing errors into warnings if PRINT_WARNING is TRUE
+ * and ignores them otherwise. returns NULL if it couldn't
+ * parse a cert for any reason. */
+static svn_x509_certinfo_t *
+parse_certificate(const svn_string_t *ascii_cert,
+                  svn_boolean_t print_warning,
+                  apr_pool_t *result_pool,
+                  apr_pool_t *scratch_pool)
+{
+  svn_x509_certinfo_t *certinfo;
+  const svn_string_t *der_cert;
+  svn_error_t *err;
+
+  /* Convert header-less PEM to DER by undoing base64 encoding. */
+  der_cert = svn_base64_decode_string(ascii_cert, scratch_pool);
+
+  err = svn_x509_parse_cert(&certinfo, der_cert->data, der_cert->len,
+                            result_pool, scratch_pool);
+  if (err)
+    {
+      /* Just display X.509 parsing errors as warnings and continue */
+      if (print_warning)
+        svn_handle_warning2(stderr, err, "svn: ");
+      svn_error_clear(err);
+      return NULL;
+    }
+
+  return certinfo;
+}
+
+
 struct walk_credentials_baton_t
 {
   int matches;
@@ -115,12 +148,58 @@ match_pattern(const char *pattern, const
   return (apr_fnmatch(p, value, flags) == APR_SUCCESS);
 }
 
+static svn_boolean_t
+match_certificate(svn_x509_certinfo_t **certinfo,
+                  const char *pattern,
+                  const svn_string_t *ascii_cert,
+                  apr_pool_t *result_pool,
+                  apr_pool_t *scratch_pool)
+{
+  const char *value;
+  const svn_checksum_t *checksum;
+  const apr_array_header_t *hostnames;
+  int i;
+
+  *certinfo = parse_certificate(ascii_cert, FALSE, result_pool, scratch_pool);
+  if (*certinfo == NULL)
+    return FALSE;
+
+  value = svn_x509_certinfo_get_subject(*certinfo, scratch_pool);
+  if (match_pattern(pattern, value, FALSE, scratch_pool))
+    return TRUE;
+
+  value = svn_x509_certinfo_get_issuer(*certinfo, scratch_pool);
+  if (match_pattern(pattern, value, FALSE, scratch_pool))
+    return TRUE;
+
+  checksum = svn_x509_certinfo_get_digest(*certinfo);
+  value = svn_checksum_to_cstring_display(checksum, scratch_pool);
+  if (match_pattern(pattern, value, TRUE, scratch_pool))
+    return TRUE;
+
+  hostnames = svn_x509_certinfo_get_hostnames(*certinfo);
+  if (hostnames)
+    {
+      for (i = 0; i < hostnames->nelts; i++)
+        {
+          const char *hostname = APR_ARRAY_IDX(hostnames, i, const char *);
+          if (match_pattern(pattern, hostname, TRUE, scratch_pool))
+            return TRUE;
+        }
+    }
+
+  return FALSE;
+}
+
+
 static svn_error_t *
 match_credential(svn_boolean_t *match,
+                 svn_x509_certinfo_t **certinfo,
                  const char *cred_kind,
                  const char *realmstring,
                  apr_array_header_t *patterns,
                  apr_array_header_t *cred_items,
+                 apr_pool_t *result_pool,
                  apr_pool_t *scratch_pool)
 {
   int i;
@@ -152,7 +231,8 @@ match_credential(svn_boolean_t *match,
                   strcmp(key, SVN_CONFIG_AUTHN_PASSPHRASE_KEY) == 0)
                 continue; /* don't match secrets */
               else if (strcmp(key, SVN_CONFIG_AUTHN_ASCII_CERT_KEY) == 0)
-                continue; /* don't match base64 data */
+                *match = match_certificate(certinfo, pattern, value,
+                                           result_pool, iterpool);
               else
                 *match = match_pattern(pattern, value->data, FALSE, iterpool);
 
@@ -168,25 +248,15 @@ match_credential(svn_boolean_t *match,
 }
 
 static svn_error_t *
-show_cert(const svn_string_t *pem_cert, apr_pool_t *scratch_pool)
+show_cert(svn_x509_certinfo_t *certinfo, const svn_string_t *pem_cert,
+          apr_pool_t *scratch_pool)
 {
-  const svn_string_t *der_cert;
-  svn_x509_certinfo_t *certinfo;
   const apr_array_header_t *hostnames;
-  svn_error_t *err;
 
-  /* Convert header-less PEM to DER by undoing base64 encoding. */
-  der_cert = svn_base64_decode_string(pem_cert, scratch_pool);
-
-  err = svn_x509_parse_cert(&certinfo, der_cert->data, der_cert->len,
-                            scratch_pool, scratch_pool);
-  if (err)
-    {
-      /* Just display X.509 parsing errors as warnings and continue */
-      svn_handle_warning2(stderr, err, "svn: ");
-      svn_error_clear(err);
-      return SVN_NO_ERROR;
-    }
+  if (certinfo == NULL)
+    certinfo = parse_certificate(pem_cert, TRUE, scratch_pool, scratch_pool);
+  if (certinfo == NULL)
+    return SVN_NO_ERROR;
 
   SVN_ERR(svn_cmdline_printf(scratch_pool, _("Subject: %s\n"),
                              svn_x509_certinfo_get_subject(certinfo, scratch_pool)));
@@ -229,6 +299,7 @@ list_credential(const char *cred_kind,
                 const char *realmstring,
                 apr_array_header_t *cred_items,
                 svn_boolean_t show_passwords,
+                svn_x509_certinfo_t *certinfo,
                 apr_pool_t *scratch_pool)
 {
   int i;
@@ -275,7 +346,7 @@ list_credential(const char *cred_kind,
       else if (strcmp(key, SVN_CONFIG_AUTHN_USERNAME_KEY) == 0)
         SVN_ERR(svn_cmdline_printf(iterpool, _("Username: %s\n"), value->data));
       else if (strcmp(key, SVN_CONFIG_AUTHN_ASCII_CERT_KEY) == 0)
-       SVN_ERR(show_cert(value, iterpool));
+       SVN_ERR(show_cert(certinfo, value, iterpool));
       else if (strcmp(key, SVN_CONFIG_AUTHN_FAILURES_KEY) == 0)
         SVN_ERR(show_cert_failures(value->data, iterpool));
       else
@@ -298,6 +369,7 @@ walk_credentials(svn_boolean_t *delete_c
 {
   struct walk_credentials_baton_t *b = baton;
   apr_array_header_t *sorted_cred_items;
+  svn_x509_certinfo_t *certinfo = NULL;
 
   *delete_cred = FALSE;
 
@@ -308,9 +380,9 @@ walk_credentials(svn_boolean_t *delete_c
     {
       svn_boolean_t match;
 
-      SVN_ERR(match_credential(&match, cred_kind, realmstring,
+      SVN_ERR(match_credential(&match, &certinfo, cred_kind, realmstring,
                                b->patterns, sorted_cred_items,
-                               scratch_pool));
+                               scratch_pool, scratch_pool));
       if (!match)
         return SVN_NO_ERROR;
     }
@@ -319,7 +391,7 @@ walk_credentials(svn_boolean_t *delete_c
 
   if (b->list)
     SVN_ERR(list_credential(cred_kind, realmstring, sorted_cred_items,
-                            b->show_passwords, scratch_pool));
+                            b->show_passwords, certinfo, scratch_pool));
   if (b->delete)
     {
       *delete_cred = TRUE;

Modified: subversion/branches/reuse-ra-session/subversion/svn/cl-conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svn/cl-conflicts.c?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svn/cl-conflicts.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svn/cl-conflicts.c Thu Jun 18 10:35:30 2015
@@ -236,7 +236,7 @@ svn_cl__get_human_readable_prop_conflict
 
   /* We provide separately translatable strings for the values that we
    * know about, and a fall-back in case any other values occur. */
-  switch (conflict->reason)
+  switch (svn_client_conflict_get_local_change(conflict))
     {
       case svn_wc_conflict_reason_edited:
         reason_str = _("local edit");
@@ -251,12 +251,14 @@ svn_cl__get_human_readable_prop_conflict
         reason_str = _("local obstruction");
         break;
       default:
-        reason_str = apr_psprintf(pool, _("local %s"),
-                                  svn_token__to_word(map_conflict_reason_xml,
-                                                     conflict->reason));
+        reason_str = apr_psprintf(
+                       pool, _("local %s"),
+                       svn_token__to_word(
+                         map_conflict_reason_xml,
+                         svn_client_conflict_get_local_change(conflict)));
         break;
     }
-  switch (conflict->action)
+  switch (svn_client_conflict_get_incoming_change(conflict))
     {
       case svn_wc_conflict_action_edit:
         action_str = _("incoming edit");
@@ -268,15 +270,18 @@ svn_cl__get_human_readable_prop_conflict
         action_str = _("incoming delete");
         break;
       default:
-        action_str = apr_psprintf(pool, _("incoming %s"),
-                                  svn_token__to_word(map_conflict_action_xml,
-                                                     conflict->action));
+        action_str = apr_psprintf(
+                       pool, _("incoming %s"),
+                       svn_token__to_word(
+                         map_conflict_action_xml,
+                         svn_client_conflict_get_incoming_change(conflict)));
         break;
     }
   SVN_ERR_ASSERT(reason_str && action_str);
   *desc = apr_psprintf(pool, _("%s, %s %s"),
                        reason_str, action_str,
-                       operation_str(conflict->operation));
+                       operation_str(
+                         svn_client_conflict_get_operation(conflict)));
   return SVN_NO_ERROR;
 }
 
@@ -288,31 +293,46 @@ svn_cl__get_human_readable_tree_conflict
 {
   const char *action, *reason, *operation;
   svn_node_kind_t incoming_kind;
+  svn_wc_conflict_action_t conflict_action;
+  svn_wc_conflict_reason_t conflict_reason;
+  svn_wc_operation_t conflict_operation;
+  svn_node_kind_t conflict_node_kind;
+
+  conflict_action = svn_client_conflict_get_incoming_change(conflict);
+  conflict_reason = svn_client_conflict_get_local_change(conflict);
+  conflict_operation = svn_client_conflict_get_operation(conflict);
+  conflict_node_kind = svn_client_conflict_get_node_kind(conflict);
 
   /* Determine the node kind of the incoming change. */
   incoming_kind = svn_node_unknown;
-  if (conflict->action == svn_wc_conflict_action_edit ||
-      conflict->action == svn_wc_conflict_action_delete)
+  if (conflict_action == svn_wc_conflict_action_edit ||
+      conflict_action == svn_wc_conflict_action_delete)
     {
+      const svn_wc_conflict_version_t *src_left_version;
+
       /* Change is acting on 'src_left' version of the node. */
-      if (conflict->src_left_version)
-        incoming_kind = conflict->src_left_version->node_kind;
+      src_left_version = svn_client_conflict_get_src_left_version(conflict);
+      if (src_left_version)
+        incoming_kind = src_left_version->node_kind;
     }
-  else if (conflict->action == svn_wc_conflict_action_add ||
-           conflict->action == svn_wc_conflict_action_replace)
+  else if (conflict_action == svn_wc_conflict_action_add ||
+           conflict_action == svn_wc_conflict_action_replace)
     {
+      const svn_wc_conflict_version_t *src_right_version;
+
       /* Change is acting on 'src_right' version of the node.
        *
        * ### For 'replace', the node kind is ambiguous. However, src_left
        * ### is NULL for replace, so we must use src_right. */
-      if (conflict->src_right_version)
-        incoming_kind = conflict->src_right_version->node_kind;
+      src_right_version = svn_client_conflict_get_src_right_version(conflict);
+      if (src_right_version)
+        incoming_kind = src_right_version->node_kind;
     }
 
-  reason = local_reason_str(conflict->node_kind, conflict->reason,
-                            conflict->operation);
-  action = incoming_action_str(incoming_kind, conflict->action);
-  operation = operation_str(conflict->operation);
+  reason = local_reason_str(conflict_node_kind, conflict_reason,
+                            conflict_operation);
+  action = incoming_action_str(incoming_kind, conflict_action);
+  operation = operation_str(conflict_operation);
   SVN_ERR_ASSERT(operation);
 
   if (action && reason)
@@ -326,12 +346,12 @@ svn_cl__get_human_readable_tree_conflict
          It will not be pretty, but is closer to an internal error than
          an ordinary user-facing string. */
       *desc = apr_psprintf(pool, _("local: %s %s incoming: %s %s %s"),
-                           svn_node_kind_to_word(conflict->node_kind),
+                           svn_node_kind_to_word(conflict_node_kind),
                            svn_token__to_word(map_conflict_reason_xml,
-                                              conflict->reason),
+                                              conflict_reason),
                            svn_node_kind_to_word(incoming_kind),
                            svn_token__to_word(map_conflict_action_xml,
-                                              conflict->action),
+                                              conflict_action),
                            operation);
     }
   return SVN_NO_ERROR;
@@ -400,20 +420,27 @@ append_tree_conflict_info_xml(svn_string
 {
   apr_hash_t *att_hash = apr_hash_make(pool);
   const char *tmp;
+  const svn_wc_conflict_version_t *src_left_version;
+  const svn_wc_conflict_version_t *src_right_version;
 
   svn_hash_sets(att_hash, "victim",
-                svn_dirent_basename(conflict->local_abspath, pool));
+                svn_dirent_basename(
+                  svn_client_conflict_get_local_abspath(conflict), pool));
 
   svn_hash_sets(att_hash, "kind",
-                svn_cl__node_kind_str_xml(conflict->node_kind));
+                svn_cl__node_kind_str_xml(
+                  svn_client_conflict_get_node_kind(conflict)));
 
   svn_hash_sets(att_hash, "operation",
-                svn_cl__operation_str_xml(conflict->operation, pool));
+                svn_cl__operation_str_xml(
+                  svn_client_conflict_get_operation(conflict), pool));
 
-  tmp = svn_token__to_word(map_conflict_action_xml, conflict->action);
+  tmp = svn_token__to_word(map_conflict_action_xml,
+                           svn_client_conflict_get_incoming_change(conflict));
   svn_hash_sets(att_hash, "action", tmp);
 
-  tmp = svn_token__to_word(map_conflict_reason_xml, conflict->reason);
+  tmp = svn_token__to_word(map_conflict_reason_xml,
+                           svn_client_conflict_get_local_change(conflict));
   svn_hash_sets(att_hash, "reason", tmp);
 
   /* Open the tree-conflict tag. */
@@ -422,16 +449,18 @@ append_tree_conflict_info_xml(svn_string
 
   /* Add child tags for OLDER_VERSION and THEIR_VERSION. */
 
-  if (conflict->src_left_version)
+  src_left_version = svn_client_conflict_get_src_left_version(conflict);
+  if (src_left_version)
     SVN_ERR(add_conflict_version_xml(&str,
                                      "source-left",
-                                     conflict->src_left_version,
+                                     src_left_version,
                                      pool));
 
-  if (conflict->src_right_version)
+  src_right_version = svn_client_conflict_get_src_right_version(conflict);
+  if (src_right_version)
     SVN_ERR(add_conflict_version_xml(&str,
                                      "source-right",
-                                     conflict->src_right_version,
+                                     src_right_version,
                                      pool));
 
   svn_xml_make_close_tag(&str, pool, "tree-conflict");
@@ -446,7 +475,15 @@ svn_cl__append_conflict_info_xml(svn_str
 {
   apr_hash_t *att_hash;
   const char *kind;
-  if (conflict->kind == svn_wc_conflict_kind_tree)
+  svn_wc_conflict_kind_t conflict_kind;
+  svn_wc_operation_t conflict_operation;
+  const svn_wc_conflict_version_t *src_left_version;
+  const svn_wc_conflict_version_t *src_right_version;
+
+  conflict_kind = svn_client_conflict_get_kind(conflict);
+  conflict_operation = svn_client_conflict_get_operation(conflict);
+
+  if (conflict_kind == svn_wc_conflict_kind_tree)
     {
       /* Uses other element type */
       return svn_error_trace(
@@ -456,53 +493,59 @@ svn_cl__append_conflict_info_xml(svn_str
   att_hash = apr_hash_make(scratch_pool);
 
   svn_hash_sets(att_hash, "operation",
-                svn_cl__operation_str_xml(conflict->operation, scratch_pool));
+                svn_cl__operation_str_xml(conflict_operation, scratch_pool));
 
 
-  kind = svn_token__to_word(map_conflict_kind_xml, conflict->kind);
+  kind = svn_token__to_word(map_conflict_kind_xml, conflict_kind);
   svn_hash_sets(att_hash, "type", kind);
 
   svn_hash_sets(att_hash, "operation",
-                svn_cl__operation_str_xml(conflict->operation, scratch_pool));
+                svn_cl__operation_str_xml(conflict_operation, scratch_pool));
 
 
   /* "<conflict>" */
   svn_xml_make_open_tag_hash(&str, scratch_pool,
                              svn_xml_normal, "conflict", att_hash);
 
-  if (conflict->src_left_version)
+  src_left_version = svn_client_conflict_get_src_left_version(conflict);
+  if (src_left_version)
     SVN_ERR(add_conflict_version_xml(&str,
                                      "source-left",
-                                     conflict->src_left_version,
+                                     src_left_version,
                                      scratch_pool));
 
-  if (conflict->src_right_version)
+  src_right_version = svn_client_conflict_get_src_right_version(conflict);
+  if (src_right_version)
     SVN_ERR(add_conflict_version_xml(&str,
                                      "source-right",
-                                     conflict->src_right_version,
+                                     src_right_version,
                                      scratch_pool));
 
-  switch (conflict->kind)
+  switch (conflict_kind)
     {
       case svn_wc_conflict_kind_text:
         /* "<prev-base-file> xx </prev-base-file>" */
-        svn_cl__xml_tagged_cdata(&str, scratch_pool, "prev-base-file",
-                                 conflict->base_abspath);
+        svn_cl__xml_tagged_cdata(
+          &str, scratch_pool, "prev-base-file",
+          svn_client_conflict_get_base_abspath(conflict));
 
         /* "<prev-wc-file> xx </prev-wc-file>" */
-        svn_cl__xml_tagged_cdata(&str, scratch_pool, "prev-wc-file",
-                                 conflict->my_abspath);
+        svn_cl__xml_tagged_cdata(
+          &str, scratch_pool, "prev-wc-file",
+          svn_client_conflict_get_my_abspath(conflict));
 
         /* "<cur-base-file> xx </cur-base-file>" */
-        svn_cl__xml_tagged_cdata(&str, scratch_pool, "cur-base-file",
-                                 conflict->their_abspath);
+        svn_cl__xml_tagged_cdata(
+          &str, scratch_pool, "cur-base-file",
+          svn_client_conflict_get_their_abspath(conflict));
 
         break;
 
       case svn_wc_conflict_kind_property:
         /* "<prop-file> xx </prop-file>" */
-        svn_cl__xml_tagged_cdata(&str, scratch_pool, "prop-file",
-                                 conflict->their_abspath);
+        svn_cl__xml_tagged_cdata(
+          &str, scratch_pool, "prop-file",
+          svn_client_conflict_get_their_abspath(conflict));
         break;
 
       default:

Modified: subversion/branches/reuse-ra-session/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svn/conflict-callbacks.c?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svn/conflict-callbacks.c Thu Jun 18 10:35:30 2015
@@ -44,6 +44,9 @@
 #include "svn_private_config.h"
 
 #define ARRAY_LEN(ary) ((sizeof (ary)) / (sizeof ((ary)[0])))
+#define MAX_ARRAY_LEN(aryx, aryz)               \
+  (ARRAY_LEN((aryx)) > ARRAY_LEN((aryz))        \
+   ? ARRAY_LEN((aryx)) : ARRAY_LEN((aryz)))
 
 
 
@@ -138,8 +141,10 @@ show_diff(const svn_wc_conflict_descript
   svn_diff_t *diff;
   svn_stream_t *output;
   svn_diff_file_options_t *options;
+  const char *merged_file;
 
-  if (desc->merged_file)
+  merged_file = svn_client_conflict_get_merged_file(desc);
+  if (merged_file)
     {
       /* For conflicts recorded by the 'merge' operation, show a diff between
        * 'mine' (the working version of the file as it appeared before the
@@ -153,26 +158,26 @@ show_diff(const svn_wc_conflict_descript
        *
        * This way, the diff is always minimal and clearly identifies changes
        * brought into the working copy by the update/switch/merge operation. */
-      if (desc->operation == svn_wc_operation_merge)
+      if (svn_client_conflict_get_operation(desc) == svn_wc_operation_merge)
         {
-          path1 = desc->my_abspath;
+          path1 = svn_client_conflict_get_my_abspath(desc);
           label1 = _("MINE");
         }
       else
         {
-          path1 = desc->their_abspath;
+          path1 = svn_client_conflict_get_their_abspath(desc);
           label1 = _("THEIRS");
         }
-      path2 = desc->merged_file;
+      path2 = merged_file;
       label2 = _("MERGED");
     }
   else
     {
       /* There's no merged file, but we can show the
          difference between mine and theirs. */
-      path1 = desc->their_abspath;
+      path1 = svn_client_conflict_get_their_abspath(desc);
       label1 = _("THEIRS");
-      path2 = desc->my_abspath;
+      path2 = svn_client_conflict_get_my_abspath(desc);
       label2 = _("MINE");
     }
 
@@ -216,24 +221,25 @@ show_conflicts(const svn_wc_conflict_des
   options->ignore_eol_style = TRUE;
   SVN_ERR(svn_stream_for_stdout(&output, pool));
   SVN_ERR(svn_diff_file_diff3_2(&diff,
-                                desc->base_abspath,
-                                desc->my_abspath,
-                                desc->their_abspath,
+                                svn_client_conflict_get_base_abspath(desc),
+                                svn_client_conflict_get_my_abspath(desc),
+                                svn_client_conflict_get_their_abspath(desc),
                                 options, pool));
   /* ### Consider putting the markers/labels from
      ### svn_wc__merge_internal in the conflict description. */
-  return svn_diff_file_output_merge3(output, diff,
-                                     desc->base_abspath,
-                                     desc->my_abspath,
-                                     desc->their_abspath,
-                                     _("||||||| ORIGINAL"),
-                                     _("<<<<<<< MINE (select with 'mc')"),
-                                     _(">>>>>>> THEIRS (select with 'tc')"),
-                                     "=======",
-                                     svn_diff_conflict_display_only_conflicts,
-                                     cancel_func,
-                                     cancel_baton,
-                                     pool);
+  return svn_diff_file_output_merge3(
+           output, diff,
+           svn_client_conflict_get_base_abspath(desc),
+           svn_client_conflict_get_my_abspath(desc),
+           svn_client_conflict_get_their_abspath(desc),
+           _("||||||| ORIGINAL"),
+           _("<<<<<<< MINE (select with 'mc')"),
+           _(">>>>>>> THEIRS (select with 'tc')"),
+           "=======",
+           svn_diff_conflict_display_only_conflicts,
+           cancel_func,
+           cancel_baton,
+           pool);
 }
 
 /* Perform a 3-way merge of the conflicting values of a property,
@@ -252,9 +258,9 @@ merge_prop_conflict(svn_stream_t *output
                     void *cancel_baton,
                     apr_pool_t *pool)
 {
-  const char *base_abspath = desc->base_abspath;
-  const char *my_abspath = desc->my_abspath;
-  const char *their_abspath = desc->their_abspath;
+  const char *base_abspath = svn_client_conflict_get_base_abspath(desc);
+  const char *my_abspath = svn_client_conflict_get_my_abspath(desc);
+  const char *their_abspath = svn_client_conflict_get_their_abspath(desc);
   svn_diff_file_options_t *options = svn_diff_file_options_create(pool);
   svn_diff_t *diff;
 
@@ -422,7 +428,7 @@ static const resolver_option_t text_conf
                                   svn_wc_conflict_choose_undefined },
   { "df", N_("show diff"),        N_("show all changes made to merged file"),
                                   svn_wc_conflict_choose_undefined },
-  { "r",  N_("mark resolved"),   N_("accept merged version of file"),
+  { "r",  N_("mark resolved"),   N_("accept merged version of file  [working]"),
                                   svn_wc_conflict_choose_merged },
   { "",   "",                     "", svn_wc_conflict_choose_unspecified },
   { "dc", N_("display conflict"), N_("show all conflicts "
@@ -461,6 +467,28 @@ static const resolver_option_t text_conf
   { NULL }
 };
 
+/* Resolver options for a binary file conflict. */
+static const resolver_option_t binary_conflict_options[] =
+{
+  /* Translators: keep long_desc below 70 characters (wrap with a left
+     margin of 9 spaces if needed); don't translate the words within square
+     brackets. */
+  { "r",  N_("mark resolved"),   N_("accept the working copy version of file "
+                                    " [working]"),
+                                  svn_wc_conflict_choose_merged },
+  { "tf", N_("their version"),    N_("accept the incoming version of file "
+                                     " [theirs-full]"),
+                                  svn_wc_conflict_choose_theirs_full },
+  { "p",  N_("postpone"),         N_("mark the conflict to be resolved later "
+                                     " [postpone]"),
+                                  svn_wc_conflict_choose_postpone },
+  { "q",  N_("quit resolution"),  N_("postpone all remaining conflicts"),
+                                  svn_wc_conflict_choose_postpone },
+  { "s",  N_("show all options"), N_("show this list (also 'h', '?')"),
+                                  svn_wc_conflict_choose_undefined },
+  { NULL }
+};
+
 /* Resolver options for a property conflict */
 static const resolver_option_t prop_conflict_options[] =
 {
@@ -686,14 +714,29 @@ handle_text_conflict(svn_wc_conflict_res
   /* Have they done *something* (edit, look at diff, etc) to
      give them a rational basis for choosing (r)esolved? */
   svn_boolean_t knows_something = FALSE;
-
-  SVN_ERR_ASSERT(desc->kind == svn_wc_conflict_kind_text);
-
-  SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
-                              _("Conflict discovered in file '%s'.\n"),
-                              svn_cl__local_style_skip_ancestor(
-                                b->path_prefix, desc->local_abspath,
-                                scratch_pool)));
+  const char *local_relpath;
+  const char *local_abspath = svn_client_conflict_get_local_abspath(desc);
+  svn_boolean_t is_binary = svn_client_conflict_get_is_binary(desc);
+  const char *base_abspath = svn_client_conflict_get_base_abspath(desc);
+  const char *my_abspath = svn_client_conflict_get_my_abspath(desc);
+  const char *their_abspath = svn_client_conflict_get_their_abspath(desc);
+  const char *merged_file = svn_client_conflict_get_merged_file(desc);
+
+  SVN_ERR_ASSERT(svn_client_conflict_get_kind(desc) ==
+                 svn_wc_conflict_kind_text);
+
+  local_relpath = svn_cl__local_style_skip_ancestor(b->path_prefix,
+                                                    local_abspath,
+                                                    scratch_pool);
+
+  if (is_binary)
+    SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+                                _("Conflict discovered in binary file '%s'.\n"),
+                                local_relpath));
+  else
+    SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+                                _("Conflict discovered in file '%s'.\n"),
+                                local_relpath));
 
   /* ### TODO This whole feature availability check is grossly outdated.
      DIFF_ALLOWED needs either to be redefined or to go away.
@@ -703,13 +746,19 @@ handle_text_conflict(svn_wc_conflict_res
      markers to the user (this is the typical 3-way merge
      scenario), or if no base is available, we can show a diff
      between mine and theirs. */
-  if ((desc->merged_file && desc->base_abspath)
-      || (!desc->base_abspath && desc->my_abspath && desc->their_abspath))
+  if (!is_binary &&
+      ((merged_file && base_abspath)
+      || (!base_abspath && my_abspath && their_abspath)))
     diff_allowed = TRUE;
 
   while (TRUE)
     {
-      const char *options[ARRAY_LEN(text_conflict_options)];
+      const char *options[1 + MAX_ARRAY_LEN(binary_conflict_options,
+                                            text_conflict_options)];
+
+      const resolver_option_t *conflict_options = is_binary
+                                                    ? binary_conflict_options
+                                                    : text_conflict_options;
       const char **next_option = options;
       const resolver_option_t *opt;
 
@@ -719,36 +768,38 @@ handle_text_conflict(svn_wc_conflict_res
       if (diff_allowed)
         {
           /* We need one more path for this feature. */
-          if (desc->my_abspath)
+          if (my_abspath)
             *next_option++ = "df";
 
           *next_option++ = "e";
 
           /* We need one more path for this feature. */
-          if (desc->my_abspath)
+          if (my_abspath)
             *next_option++ = "m";
 
           if (knows_something)
             *next_option++ = "r";
 
-          if (! desc->is_binary)
-            {
-              *next_option++ = "mc";
-              *next_option++ = "tc";
-            }
+          *next_option++ = "mc";
+          *next_option++ = "tc";
         }
       else
         {
           if (knows_something)
             *next_option++ = "r";
-          *next_option++ = "mf";
+
+          /* The 'mine-full' option selects the ".mine" file so only offer
+           * it if that file exists. It does not exist for binary files,
+           * for example (questionable historical behaviour since 1.0). */
+          if (my_abspath)
+            *next_option++ = "mf";
+
           *next_option++ = "tf";
         }
       *next_option++ = "s";
       *next_option++ = NULL;
 
-      SVN_ERR(prompt_user(&opt, text_conflict_options, options, b->pb,
-                          iterpool));
+      SVN_ERR(prompt_user(&opt, conflict_options, options, b->pb, iterpool));
       if (! opt)
         continue;
 
@@ -762,12 +813,12 @@ handle_text_conflict(svn_wc_conflict_res
       else if (strcmp(opt->code, "s") == 0)
         {
           SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "\n%s\n",
-                                      help_string(text_conflict_options,
+                                      help_string(conflict_options,
                                                   iterpool)));
         }
       else if (strcmp(opt->code, "dc") == 0)
         {
-          if (desc->is_binary)
+          if (is_binary)
             {
               SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                                           _("Invalid option; cannot "
@@ -775,8 +826,7 @@ handle_text_conflict(svn_wc_conflict_res
                                             "binary file.\n\n")));
               continue;
             }
-          else if (! (desc->my_abspath && desc->base_abspath &&
-                      desc->their_abspath))
+          else if (! (my_abspath && base_abspath && their_abspath))
             {
               SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                                           _("Invalid option; original "
@@ -792,7 +842,7 @@ handle_text_conflict(svn_wc_conflict_res
       else if (strcmp(opt->code, "df") == 0)
         {
           /* Re-check preconditions. */
-          if (! diff_allowed || ! desc->my_abspath)
+          if (! diff_allowed || ! my_abspath)
             {
               SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                              _("Invalid option; there's no "
@@ -807,7 +857,7 @@ handle_text_conflict(svn_wc_conflict_res
         }
       else if (strcmp(opt->code, "e") == 0 || strcmp(opt->code, ":-E") == 0)
         {
-          SVN_ERR(open_editor(&performed_edit, desc->merged_file, b, iterpool));
+          SVN_ERR(open_editor(&performed_edit, merged_file, b, iterpool));
           if (performed_edit)
             knows_something = TRUE;
         }
@@ -817,7 +867,7 @@ handle_text_conflict(svn_wc_conflict_res
           svn_error_t *err;
 
           /* Re-check preconditions. */
-          if (! desc->my_abspath)
+          if (! my_abspath)
             {
               SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                              _("Invalid option; there's no "
@@ -825,11 +875,11 @@ handle_text_conflict(svn_wc_conflict_res
               continue;
             }
 
-          err = svn_cl__merge_file_externally(desc->base_abspath,
-                                              desc->their_abspath,
-                                              desc->my_abspath,
-                                              desc->merged_file,
-                                              desc->local_abspath, b->config,
+          err = svn_cl__merge_file_externally(base_abspath,
+                                              their_abspath,
+                                              my_abspath,
+                                              merged_file,
+                                              local_abspath, b->config,
                                               NULL, iterpool);
           if (err)
             {
@@ -840,11 +890,11 @@ handle_text_conflict(svn_wc_conflict_res
                   /* Try the internal merge tool. */
                   svn_error_clear(err);
                   SVN_ERR(svn_cl__merge_file(&remains_in_conflict,
-                                             desc->base_abspath,
-                                             desc->their_abspath,
-                                             desc->my_abspath,
-                                             desc->merged_file,
-                                             desc->local_abspath,
+                                             base_abspath,
+                                             their_abspath,
+                                             my_abspath,
+                                             merged_file,
+                                             local_abspath,
                                              b->path_prefix,
                                              b->editor_cmd,
                                              b->config,
@@ -883,18 +933,17 @@ handle_text_conflict(svn_wc_conflict_res
            *     and then when the user chooses it say 'Invalid option'. */
           /* ### 'merged_file' shouldn't be necessary *before* we launch the
            *     resolver: it should be the *result* of doing so. */
-          if (desc->base_abspath && desc->their_abspath &&
-              desc->my_abspath && desc->merged_file)
+          if (base_abspath && their_abspath && my_abspath && merged_file)
             {
               svn_error_t *err;
               char buf[1024];
               const char *message;
 
-              err = svn_cl__merge_file_externally(desc->base_abspath,
-                                                  desc->their_abspath,
-                                                  desc->my_abspath,
-                                                  desc->merged_file,
-                                                  desc->local_abspath,
+              err = svn_cl__merge_file_externally(base_abspath,
+                                                  their_abspath,
+                                                  my_abspath,
+                                                  merged_file,
+                                                  local_abspath,
                                                   b->config, NULL, iterpool);
               if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_MERGE_TOOL ||
                           err->apr_err == SVN_ERR_EXTERNAL_PROGRAM))
@@ -921,11 +970,11 @@ handle_text_conflict(svn_wc_conflict_res
           svn_boolean_t remains_in_conflict = TRUE;
 
           SVN_ERR(svn_cl__merge_file(&remains_in_conflict,
-                                     desc->base_abspath,
-                                     desc->their_abspath,
-                                     desc->my_abspath,
-                                     desc->merged_file,
-                                     desc->local_abspath,
+                                     base_abspath,
+                                     their_abspath,
+                                     my_abspath,
+                                     merged_file,
+                                     local_abspath,
                                      b->path_prefix,
                                      b->editor_cmd,
                                      b->config,
@@ -940,7 +989,7 @@ handle_text_conflict(svn_wc_conflict_res
         {
           if ((opt->choice == svn_wc_conflict_choose_mine_conflict
                || opt->choice == svn_wc_conflict_choose_theirs_conflict)
-              && desc->is_binary)
+              && is_binary)
             {
               SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                                           _("Invalid option; cannot choose "
@@ -995,14 +1044,16 @@ handle_prop_conflict(svn_wc_conflict_res
   ((svn_wc_conflict_description2_t *)desc)->their_abspath = desc->merged_file;
   ((svn_wc_conflict_description2_t *)desc)->merged_file = NULL;
 
-  SVN_ERR_ASSERT(desc->kind == svn_wc_conflict_kind_property);
+  SVN_ERR_ASSERT(svn_client_conflict_get_kind(desc) ==
+                 svn_wc_conflict_kind_property);
 
   SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
                               _("Conflict for property '%s' discovered"
                                 " on '%s'.\n"),
-                              desc->property_name,
+                              svn_client_conflict_get_property_name(desc),
                               svn_cl__local_style_skip_ancestor(
-                                b->path_prefix, desc->local_abspath,
+                                b->path_prefix,
+                                svn_client_conflict_get_local_abspath(desc),
                                 scratch_pool)));
 
   SVN_ERR(svn_cl__get_human_readable_prop_conflict_description(&message, desc,
@@ -1089,6 +1140,8 @@ handle_tree_conflict(svn_wc_conflict_res
                      apr_pool_t *scratch_pool)
 {
   const char *readable_desc;
+  const char *src_left_version;
+  const char *src_right_version;
   apr_pool_t *iterpool;
 
   SVN_ERR(svn_cl__get_human_readable_tree_conflict_description(
@@ -1097,10 +1150,26 @@ handle_tree_conflict(svn_wc_conflict_res
                stderr, scratch_pool,
                _("Tree conflict on '%s'\n   > %s\n"),
                svn_cl__local_style_skip_ancestor(b->path_prefix,
-                                                 desc->local_abspath,
-                                                 scratch_pool),
+                 svn_client_conflict_get_local_abspath(desc), scratch_pool),
                readable_desc));
 
+  src_left_version =
+              svn_cl__node_description(
+                svn_client_conflict_get_src_left_version(desc),
+                svn_client_conflict_get_src_left_version(desc)->repos_url,
+                scratch_pool);
+  if (src_left_version)
+    SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "%s: %s\n",
+                                _("Source  left"), src_left_version));
+  src_right_version =
+              svn_cl__node_description(
+                svn_client_conflict_get_src_right_version(desc),
+                svn_client_conflict_get_src_right_version(desc)->repos_url,
+                scratch_pool);
+  if (src_right_version)
+    SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "%s: %s\n",
+                                _("Source right"), src_right_version));
+
   iterpool = svn_pool_create(scratch_pool);
   while (1)
     {
@@ -1111,18 +1180,22 @@ handle_tree_conflict(svn_wc_conflict_res
 
       tc_opts = tree_conflict_options;
 
-      if (desc->operation == svn_wc_operation_update ||
-          desc->operation == svn_wc_operation_switch)
+      if (svn_client_conflict_get_operation(desc) == svn_wc_operation_update ||
+          svn_client_conflict_get_operation(desc) == svn_wc_operation_switch)
         {
-          if (desc->reason == svn_wc_conflict_reason_moved_away)
+          svn_wc_conflict_reason_t reason;
+
+          reason = svn_client_conflict_get_local_change(desc);
+          if (reason == svn_wc_conflict_reason_moved_away)
             {
               tc_opts = tree_conflict_options_update_moved_away;
             }
-          else if (desc->reason == svn_wc_conflict_reason_deleted ||
-                   desc->reason == svn_wc_conflict_reason_replaced)
+          else if (reason == svn_wc_conflict_reason_deleted ||
+                   reason == svn_wc_conflict_reason_replaced)
             {
-              if (desc->action == svn_wc_conflict_action_edit &&
-                  desc->node_kind == svn_node_dir)
+              if (svn_client_conflict_get_incoming_change(desc) ==
+                  svn_wc_conflict_action_edit &&
+                  svn_client_conflict_get_node_kind(desc) == svn_node_dir)
                 tc_opts = tree_conflict_options_update_edit_deleted_dir;
             }
         }
@@ -1159,6 +1232,10 @@ conflict_func_interactive(svn_wc_conflic
 {
   svn_cl__interactive_conflict_baton_t *b = baton;
   svn_error_t *err;
+  const char *base_abspath = svn_client_conflict_get_base_abspath(desc);
+  const char *my_abspath = svn_client_conflict_get_my_abspath(desc);
+  const char *their_abspath = svn_client_conflict_get_their_abspath(desc);
+  const char *merged_file = svn_client_conflict_get_merged_file(desc);
 
   /* Start out assuming we're going to postpone the conflict. */
   *result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
@@ -1179,8 +1256,8 @@ conflict_func_interactive(svn_wc_conflic
     case svn_cl__accept_working:
       /* If the caller didn't merge the property values, then I guess
        * 'choose working' means 'choose mine'... */
-      if (! desc->merged_file)
-        (*result)->merged_file = desc->my_abspath;
+      if (! merged_file)
+        (*result)->merged_file = my_abspath;
       (*result)->choice = svn_wc_conflict_choose_merged;
       return SVN_NO_ERROR;
     case svn_cl__accept_mine_conflict:
@@ -1196,7 +1273,7 @@ conflict_func_interactive(svn_wc_conflic
       (*result)->choice = svn_wc_conflict_choose_theirs_full;
       return SVN_NO_ERROR;
     case svn_cl__accept_edit:
-      if (desc->merged_file)
+      if (merged_file)
         {
           if (b->external_failed)
             {
@@ -1204,7 +1281,7 @@ conflict_func_interactive(svn_wc_conflic
               return SVN_NO_ERROR;
             }
 
-          err = svn_cmdline__edit_file_externally(desc->merged_file,
+          err = svn_cmdline__edit_file_externally(merged_file,
                                                   b->editor_cmd, b->config,
                                                   scratch_pool);
           if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_EDITOR ||
@@ -1227,10 +1304,10 @@ conflict_func_interactive(svn_wc_conflic
       /* else, fall through to prompting. */
       break;
     case svn_cl__accept_launch:
-      if (desc->base_abspath && desc->their_abspath
-          && desc->my_abspath && desc->merged_file)
+      if (base_abspath && their_abspath && my_abspath && merged_file)
         {
           svn_boolean_t remains_in_conflict;
+          const char *local_abspath;
 
           if (b->external_failed)
             {
@@ -1238,11 +1315,12 @@ conflict_func_interactive(svn_wc_conflic
               return SVN_NO_ERROR;
             }
 
-          err = svn_cl__merge_file_externally(desc->base_abspath,
-                                              desc->their_abspath,
-                                              desc->my_abspath,
-                                              desc->merged_file,
-                                              desc->local_abspath,
+          local_abspath = svn_client_conflict_get_local_abspath(desc);
+          err = svn_cl__merge_file_externally(base_abspath,
+                                              their_abspath,
+                                              my_abspath,
+                                              merged_file,
+                                              local_abspath,
                                               b->config,
                                               &remains_in_conflict,
                                               scratch_pool);
@@ -1286,13 +1364,15 @@ conflict_func_interactive(svn_wc_conflic
      Conflicting edits on a file's text, or
      Conflicting edits on a property.
   */
-  if (((desc->kind == svn_wc_conflict_kind_text)
-       && (desc->action == svn_wc_conflict_action_edit)
-       && (desc->reason == svn_wc_conflict_reason_edited)))
+  if (((svn_client_conflict_get_kind(desc) == svn_wc_conflict_kind_text)
+       && (svn_client_conflict_get_incoming_change(desc) ==
+           svn_wc_conflict_action_edit)
+       && (svn_client_conflict_get_local_change(desc) ==
+           svn_wc_conflict_reason_edited)))
     SVN_ERR(handle_text_conflict(*result, desc, b, scratch_pool));
-  else if (desc->kind == svn_wc_conflict_kind_property)
+  else if (svn_client_conflict_get_kind(desc) == svn_wc_conflict_kind_property)
     SVN_ERR(handle_prop_conflict(*result, desc, b, result_pool, scratch_pool));
-  else if (desc->kind == svn_wc_conflict_kind_tree)
+  else if (svn_client_conflict_get_kind(desc) == svn_wc_conflict_kind_tree)
     SVN_ERR(handle_tree_conflict(*result, desc, b, scratch_pool));
 
   else /* other types of conflicts -- do nothing about them. */
@@ -1320,10 +1400,11 @@ svn_cl__conflict_func_interactive(svn_wc
     {
       const char *local_path
         = svn_cl__local_style_skip_ancestor(
-            b->path_prefix, desc->local_abspath, scratch_pool);
+            b->path_prefix, svn_client_conflict_get_local_abspath(desc),
+            scratch_pool);
 
       svn_cl__conflict_stats_resolved(b->conflict_stats, local_path,
-                                      desc->kind);
+                                      svn_client_conflict_get_kind(desc));
     }
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/reuse-ra-session/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svn/diff-cmd.c?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svn/diff-cmd.c Thu Jun 18 10:35:30 2015
@@ -82,6 +82,7 @@ kind_to_word(svn_client_diff_summarize_k
 struct summarize_baton_t
 {
   const char *anchor;
+  svn_boolean_t ignore_properties;
 };
 
 /* Print summary information about a given change as XML, implements the
@@ -98,6 +99,11 @@ summarize_xml(const svn_client_diff_summ
    * baton, and appending the target's relative path. */
   const char *path = b->anchor;
   svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
+  const char *prop_change;
+
+  if (b->ignore_properties &&
+      summary->summarize_kind == svn_client_diff_summarize_kind_normal)
+    return SVN_NO_ERROR;
 
   /* Tack on the target path, so we can differentiate between different parts
    * of the output when we're given multiple targets. */
@@ -114,10 +120,14 @@ summarize_xml(const svn_client_diff_summ
       path = svn_dirent_local_style(path, pool);
     }
 
+  prop_change = summary->prop_changed ? "modified" : "none";
+  if (b->ignore_properties)
+    prop_change = "none";
+
   svn_xml_make_open_tag(&sb, pool, svn_xml_protect_pcdata, "path",
                         "kind", svn_cl__node_kind_str_xml(summary->node_kind),
                         "item", kind_to_word(summary->summarize_kind),
-                        "props", summary->prop_changed ? "modified" : "none",
+                        "props",  prop_change,
                         SVN_VA_NULL);
 
   svn_xml_escape_cdata_cstring(&sb, path, pool);
@@ -135,6 +145,11 @@ summarize_regular(const svn_client_diff_
 {
   struct summarize_baton_t *b = baton;
   const char *path = b->anchor;
+  char prop_change;
+
+  if (b->ignore_properties &&
+      summary->summarize_kind == svn_client_diff_summarize_kind_normal)
+    return SVN_NO_ERROR;
 
   /* Tack on the target path, so we can differentiate between different parts
    * of the output when we're given multiple targets. */
@@ -155,11 +170,13 @@ summarize_regular(const svn_client_diff_
    *       thus the blank spaces where information that is not relevant to
    *       a diff summary would go. */
 
-  SVN_ERR(svn_cmdline_printf(pool,
-                             "%c%c      %s\n",
+  prop_change = summary->prop_changed ? 'M' : ' ';
+  if (b->ignore_properties)
+    prop_change = ' ';
+
+  SVN_ERR(svn_cmdline_printf(pool, "%c%c      %s\n",
                              kind_to_char(summary->summarize_kind),
-                             summary->prop_changed ? 'M' : ' ',
-                             path));
+                             prop_change, path));
 
   return svn_cmdline_fflush(stdout);
 }
@@ -216,6 +233,43 @@ svn_cl__diff(apr_getopt_t *os,
       svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "paths", SVN_VA_NULL);
       SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
     }
+  if (opt_state->diff.summarize)
+    {
+      if (opt_state->diff.use_git_diff_format)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--git");
+      if (opt_state->diff.patch_compatible)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--patch-compatible");
+      if (opt_state->diff.show_copies_as_adds)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--show-copies-as-adds");
+      if (opt_state->diff.internal_diff)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--internal-diff");
+      if (opt_state->diff.diff_cmd)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--diff-cmd");
+      if (opt_state->diff.no_diff_added)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--no-diff-added");
+      if (opt_state->diff.no_diff_deleted)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--no-diff-deleted");
+      if (opt_state->force)
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("'%s' not valid with '--summarize' option"),
+                                 "--force");
+      /* Not handling ignore-properties, and properties-only as there should
+         be a patch adding support for these being applied soon */
+    }
 
   SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
                                                       opt_state->targets,
@@ -395,6 +449,7 @@ svn_cl__diff(apr_getopt_t *os,
           if (opt_state->diff.summarize)
             {
               summarize_baton.anchor = target1;
+              summarize_baton.ignore_properties = ignore_properties;
 
               SVN_ERR(svn_client_diff_summarize2(
                                 target1,
@@ -447,6 +502,7 @@ svn_cl__diff(apr_getopt_t *os,
           if (opt_state->diff.summarize)
             {
               summarize_baton.anchor = truepath;
+              summarize_baton.ignore_properties = ignore_properties;
               SVN_ERR(svn_client_diff_summarize_peg2(
                                 truepath,
                                 &peg_revision,

Modified: subversion/branches/reuse-ra-session/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svn/info-cmd.c?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svn/info-cmd.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svn/info-cmd.c Thu Jun 18 10:35:30 2015
@@ -591,32 +591,39 @@ print_info(void *baton,
                     APR_ARRAY_IDX(info->wc_info->conflicts, i,
                                   const svn_wc_conflict_description2_t *);
               const char *desc;
+              const char *base_abspath;
+              const char *my_abspath;
+              const char *their_abspath;
+
+              base_abspath = svn_client_conflict_get_base_abspath(conflict);
+              my_abspath = svn_client_conflict_get_my_abspath(conflict);
+              their_abspath = svn_client_conflict_get_their_abspath(conflict);
 
-              switch (conflict->kind)
+              switch (svn_client_conflict_get_kind(conflict))
                 {
                   case svn_wc_conflict_kind_text:
-                    if (conflict->base_abspath)
+                    if (base_abspath)
                       SVN_ERR(svn_cmdline_printf(pool,
                                 _("Conflict Previous Base File: %s\n"),
                                 svn_cl__local_style_skip_ancestor(
                                         receiver_baton->path_prefix,
-                                        conflict->base_abspath,
+                                        base_abspath,
                                         pool)));
 
-                    if (conflict->my_abspath)
+                    if (my_abspath)
                       SVN_ERR(svn_cmdline_printf(pool,
                                 _("Conflict Previous Working File: %s\n"),
                                 svn_cl__local_style_skip_ancestor(
                                         receiver_baton->path_prefix,
-                                        conflict->my_abspath,
+                                        my_abspath,
                                         pool)));
 
-                    if (conflict->their_abspath)
+                    if (their_abspath)
                       SVN_ERR(svn_cmdline_printf(pool,
                                 _("Conflict Current Base File: %s\n"),
                                 svn_cl__local_style_skip_ancestor(
                                         receiver_baton->path_prefix,
-                                        conflict->their_abspath,
+                                        their_abspath,
                                         pool)));
                   break;
 
@@ -625,9 +632,10 @@ print_info(void *baton,
                       SVN_ERR(svn_cmdline_printf(pool,
                                 _("Conflict Properties File: %s\n"),
                                 svn_cl__local_style_skip_ancestor(
-                                        receiver_baton->path_prefix,
-                                        conflict->prop_reject_abspath,
-                                        pool)));
+                                  receiver_baton->path_prefix,
+                                  svn_client_conflict_get_prop_reject_abspath(
+                                    conflict),
+                                  pool)));
                     printed_prop_conflict_file = TRUE;
                   break;
 
@@ -659,21 +667,23 @@ print_info(void *baton,
                 const char *desc;
 
                 SVN_ERR(svn_cl__get_human_readable_action_description(&desc,
-                                        svn_wc_conflict_action_edit,
-                                        conflict->operation,
-                                        conflict->node_kind, pool));
+                          svn_wc_conflict_action_edit,
+                          svn_client_conflict_get_operation(conflict),
+                          svn_client_conflict_get_node_kind(conflict), pool));
 
                 SVN_ERR(svn_cmdline_printf(pool, "%s: %s\n",
                                                _("Conflict Details"), desc));
               }
 
             src_left_version =
-                        svn_cl__node_description(conflict->src_left_version,
-                                                 info->repos_root_URL, pool);
+                        svn_cl__node_description(
+                          svn_client_conflict_get_src_left_version(conflict),
+                          info->repos_root_URL, pool);
 
             src_right_version =
-                        svn_cl__node_description(conflict->src_right_version,
-                                                 info->repos_root_URL, pool);
+                        svn_cl__node_description(
+                          svn_client_conflict_get_src_right_version(conflict),
+                          info->repos_root_URL, pool);
 
             if (src_left_version)
               SVN_ERR(svn_cmdline_printf(pool, "  %s: %s\n",

Modified: subversion/branches/reuse-ra-session/subversion/svn/list-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svn/list-cmd.c?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svn/list-cmd.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svn/list-cmd.c Thu Jun 18 10:35:30 2015
@@ -49,6 +49,12 @@ struct print_baton {
   svn_boolean_t in_external;
 };
 
+/* Field flags required for this function */
+static const apr_uint32_t print_dirent_fields = SVN_DIRENT_KIND;
+static const apr_uint32_t print_dirent_fields_verbose = (
+    SVN_DIRENT_KIND  | SVN_DIRENT_SIZE | SVN_DIRENT_TIME |
+    SVN_DIRENT_CREATED_REV | SVN_DIRENT_LAST_AUTHOR);
+
 /* This implements the svn_client_list_func2_t API, printing a single
    directory entry in text format. */
 static svn_error_t *
@@ -161,7 +167,10 @@ print_dirent(void *baton,
     }
 }
 
-
+/* Field flags required for this function */
+static const apr_uint32_t print_dirent_xml_fields = (
+    SVN_DIRENT_KIND  | SVN_DIRENT_SIZE | SVN_DIRENT_TIME |
+    SVN_DIRENT_CREATED_REV | SVN_DIRENT_LAST_AUTHOR);
 /* This implements the svn_client_list_func2_t API, printing a single dirent
    in XML format. */
 static svn_error_t *
@@ -314,10 +323,12 @@ svn_cl__list(apr_getopt_t *os,
                                   "mode"));
     }
 
-  if (opt_state->verbose || opt_state->xml)
-    dirent_fields = SVN_DIRENT_ALL;
+  if (opt_state->xml)
+    dirent_fields = print_dirent_xml_fields;
+  else if (opt_state->verbose)
+    dirent_fields = print_dirent_fields_verbose;
   else
-    dirent_fields = SVN_DIRENT_KIND; /* the only thing we actually need... */
+    dirent_fields = print_dirent_fields;
 
   pb.ctx = ctx;
   pb.verbose = opt_state->verbose;

Modified: subversion/branches/reuse-ra-session/subversion/svn/similarity.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svn/similarity.c?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svn/similarity.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svn/similarity.c Thu Jun 18 10:35:30 2015
@@ -114,6 +114,8 @@ svn_cl__similarity_check(const char *key
     {
       svn_cl__simcheck_t *const token = tokens[i];
       token->context = NULL;
+      /* If you update this factor, consider updating
+       * ../libsvn_subr/cmdline.c:most_similar(). */
       if (token->score >= (2 * SVN_STRING__SIM_RANGE_MAX + 1) / 3)
         ++result;
     }

Modified: subversion/branches/reuse-ra-session/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svn/status-cmd.c?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svn/status-cmd.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svn/status-cmd.c Thu Jun 18 10:35:30 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/reuse-ra-session/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svn/svn.c?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svn/svn.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svn/svn.c Thu Jun 18 10:35:30 2015
@@ -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,
@@ -243,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"
+                       "                             "
+                       "valid certificate) and 'other' (all other not\n"
                        "                             "
-                       "certificates with failures other than the above")},
+                       "separately classified certificate errors).")},
   {"non-interactive", opt_non_interactive, 0,
                     N_("do no interactive prompting (default is to prompt\n"
                        "                             "
@@ -408,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,
@@ -459,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
 };
 
@@ -1457,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"
@@ -1638,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_
@@ -2185,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;
@@ -2265,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;
@@ -2635,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"));
     }
 

Modified: subversion/branches/reuse-ra-session/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svnadmin/svnadmin.c?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svnadmin/svnadmin.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svnadmin/svnadmin.c Thu Jun 18 10:35:30 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/reuse-ra-session/subversion/svnbench/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svnbench/cl.h?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svnbench/cl.h (original)
+++ subversion/branches/reuse-ra-session/subversion/svnbench/cl.h Thu Jun 18 10:35:30 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/reuse-ra-session/subversion/svnbench/svnbench.c
URL: http://svn.apache.org/viewvc/subversion/branches/reuse-ra-session/subversion/svnbench/svnbench.c?rev=1686174&r1=1686173&r2=1686174&view=diff
==============================================================================
--- subversion/branches/reuse-ra-session/subversion/svnbench/svnbench.c (original)
+++ subversion/branches/reuse-ra-session/subversion/svnbench/svnbench.c Thu Jun 18 10:35:30 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)
         {