You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2013/05/10 16:58:56 UTC

svn commit: r1481041 [30/38] - in /subversion/branches/master-passphrase: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/client-side/svncopy/ contrib/hook-scripts/ contrib/server-side/fsfsfixer/ contrib/server-side/fsfsf...

Modified: subversion/branches/master-passphrase/subversion/svn/cl-conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/cl-conflicts.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/cl-conflicts.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/cl-conflicts.c Fri May 10 14:58:47 2013
@@ -22,6 +22,7 @@
  */
 
 #include "cl-conflicts.h"
+#include "svn_hash.h"
 #include "svn_xml.h"
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
@@ -32,16 +33,6 @@
 #include "svn_private_config.h"
 
 
-/* A map for svn_wc_conflict_action_t values to human-readable strings */
-static const svn_token_map_t map_conflict_action_human[] =
-{
-  { N_("edit"),         svn_wc_conflict_action_edit },
-  { N_("delete"),       svn_wc_conflict_action_delete },
-  { N_("add"),          svn_wc_conflict_action_add },
-  { N_("replace"),      svn_wc_conflict_action_replace },
-  { NULL,               0 }
-};
-
 /* A map for svn_wc_conflict_action_t values to XML strings */
 static const svn_token_map_t map_conflict_action_xml[] =
 {
@@ -52,21 +43,6 @@ static const svn_token_map_t map_conflic
   { NULL,               0 }
 };
 
-/* A map for svn_wc_conflict_reason_t values to human-readable strings */
-static const svn_token_map_t map_conflict_reason_human[] =
-{
-  { N_("edit"),         svn_wc_conflict_reason_edited },
-  { N_("delete"),       svn_wc_conflict_reason_deleted },
-  { N_("missing"),      svn_wc_conflict_reason_missing },
-  { N_("obstruction"),  svn_wc_conflict_reason_obstructed },
-  { N_("add"),          svn_wc_conflict_reason_added },
-  { N_("replace"),      svn_wc_conflict_reason_replaced },
-  { N_("unversioned"),  svn_wc_conflict_reason_unversioned },
-  { N_("moved away"),   svn_wc_conflict_reason_moved_away },
-  { N_("moved here"),   svn_wc_conflict_reason_moved_here },
-  { NULL,               0 }
-};
-
 /* A map for svn_wc_conflict_reason_t values to XML strings */
 static const svn_token_map_t map_conflict_reason_xml[] =
 {
@@ -90,18 +66,176 @@ static const svn_token_map_t map_conflic
   { NULL,               0 }
 };
 
-/* Return a localized string representation of CONFLICT->action. */
+/* Return a localised string representation of the local part of a conflict;
+   NULL for non-localised odd cases. */
 static const char *
-action_str(const svn_wc_conflict_description2_t *conflict)
+local_reason_str(svn_node_kind_t kind, svn_wc_conflict_reason_t reason)
 {
-  return _(svn_token__to_word(map_conflict_action_human, conflict->action));
+  switch (kind)
+    {
+      case svn_node_file:
+        switch (reason)
+          {
+          case svn_wc_conflict_reason_edited:
+            return _("local file edit");
+          case svn_wc_conflict_reason_obstructed:
+            return _("local file obstruction");
+          case svn_wc_conflict_reason_deleted:
+            return _("local file delete");
+          case svn_wc_conflict_reason_missing:
+            return _("local file missing");
+          case svn_wc_conflict_reason_unversioned:
+            return _("local file unversioned");
+          case svn_wc_conflict_reason_added:
+            return _("local file add");
+          case svn_wc_conflict_reason_replaced:
+            return _("local file replace");
+          case svn_wc_conflict_reason_moved_away:
+            return _("local file moved away");
+          case svn_wc_conflict_reason_moved_here:
+            return _("local file moved here");
+          }
+        break;
+      case svn_node_dir:
+        switch (reason)
+          {
+          case svn_wc_conflict_reason_edited:
+            return _("local dir edit");
+          case svn_wc_conflict_reason_obstructed:
+            return _("local dir obstruction");
+          case svn_wc_conflict_reason_deleted:
+            return _("local dir delete");
+          case svn_wc_conflict_reason_missing:
+            return _("local dir missing");
+          case svn_wc_conflict_reason_unversioned:
+            return _("local dir unversioned");
+          case svn_wc_conflict_reason_added:
+            return _("local dir add");
+          case svn_wc_conflict_reason_replaced:
+            return _("local dir replace");
+          case svn_wc_conflict_reason_moved_away:
+            return _("local dir moved away");
+          case svn_wc_conflict_reason_moved_here:
+            return _("local dir moved here");
+          }
+        break;
+      case svn_node_symlink:
+      case svn_node_none:
+      case svn_node_unknown:
+        break;
+    }
+  return NULL;
 }
 
-/* Return a localized string representation of CONFLICT->reason. */
+/* Return a localised string representation of the incoming part of a
+   conflict; NULL for non-localised odd cases. */
 static const char *
-reason_str(const svn_wc_conflict_description2_t *conflict)
+incoming_action_str(svn_node_kind_t kind, svn_wc_conflict_action_t action)
+{
+  switch (kind)
+    {
+      case svn_node_file:
+        switch (action)
+          {
+            case svn_wc_conflict_action_edit:
+              return _("incoming file edit");
+            case svn_wc_conflict_action_add:
+              return _("incoming file add");
+            case svn_wc_conflict_action_delete:
+              return _("incoming file delete");
+            case svn_wc_conflict_action_replace:
+              return _("incoming file replace");
+          }
+        break;
+      case svn_node_dir:
+        switch (action)
+          {
+            case svn_wc_conflict_action_edit:
+              return _("incoming dir edit");
+            case svn_wc_conflict_action_add:
+              return _("incoming dir add");
+            case svn_wc_conflict_action_delete:
+              return _("incoming dir delete");
+            case svn_wc_conflict_action_replace:
+              return _("incoming dir replace");
+          }
+        break;
+      case svn_node_symlink:
+      case svn_node_none:
+      case svn_node_unknown:
+        break;
+    }
+  return NULL;
+}
+
+/* Return a localised string representation of the operation part of a
+   conflict. */
+static const char *
+operation_str(svn_wc_operation_t operation)
+{
+  switch (operation)
+    {
+    case svn_wc_operation_update: return _("upon update");
+    case svn_wc_operation_switch: return _("upon switch");
+    case svn_wc_operation_merge:  return _("upon merge");
+    case svn_wc_operation_none:   return _("upon none");
+    }
+  SVN_ERR_MALFUNCTION_NO_RETURN();
+  return NULL;
+}
+
+svn_error_t *
+svn_cl__get_human_readable_prop_conflict_description(
+  const char **desc,
+  const svn_wc_conflict_description2_t *conflict,
+  apr_pool_t *pool)
 {
-  return _(svn_token__to_word(map_conflict_reason_human, conflict->reason));
+  const char *reason_str, *action_str;
+
+  /* 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)
+    {
+      case svn_wc_conflict_reason_edited:
+        reason_str = _("local edit");
+        break;
+      case svn_wc_conflict_reason_added:
+        reason_str = _("local add");
+        break;
+      case svn_wc_conflict_reason_deleted:
+        reason_str = _("local delete");
+        break;
+      case svn_wc_conflict_reason_obstructed:
+        reason_str = _("local obstruction");
+        break;
+      default:
+        reason_str = apr_psprintf(pool, _("local %s"),
+                                  svn_token__to_word(map_conflict_reason_xml,
+                                                     conflict->reason));
+        break;
+    }
+  switch (conflict->action)
+    {
+      case svn_wc_conflict_action_edit:
+        action_str = _("incoming edit");
+        break;
+      case svn_wc_conflict_action_add:
+        action_str = _("incoming add");
+        break;
+      case svn_wc_conflict_action_delete:
+        action_str = _("incoming delete");
+        break;
+      default:
+        action_str = apr_psprintf(pool, _("incoming %s"),
+                                  svn_token__to_word(map_conflict_action_xml,
+                                                     conflict->action));
+        break;
+    }
+  SVN_ERR_ASSERT(reason_str && action_str);
+  *desc = apr_psprintf(pool, _("%s, %s %s"),
+                       reason_str, action_str,
+                       operation_str(conflict->operation));
+  return SVN_NO_ERROR;
 }
 
 svn_error_t *
@@ -113,10 +247,6 @@ svn_cl__get_human_readable_tree_conflict
   const char *action, *reason, *operation;
   svn_node_kind_t incoming_kind;
 
-  reason = reason_str(conflict);
-  action = action_str(conflict);
-  operation = svn_cl__operation_str_human_readable(conflict->operation, pool);
-
   /* Determine the node kind of the incoming change. */
   incoming_kind = svn_node_unknown;
   if (conflict->action == svn_wc_conflict_action_edit ||
@@ -137,13 +267,30 @@ svn_cl__get_human_readable_tree_conflict
         incoming_kind = conflict->src_right_version->node_kind;
     }
 
-  SVN_ERR_ASSERT(action && reason);
-  *desc = apr_psprintf(pool, _("local %s %s, incoming %s %s upon %s"),
-                       svn_node_kind_to_word(conflict->node_kind),
-                       reason,
-                       svn_node_kind_to_word(incoming_kind),
-                       action,
-                       operation);
+  reason = local_reason_str(conflict->node_kind, conflict->reason);
+  action = incoming_action_str(incoming_kind, conflict->action);
+  operation = operation_str(conflict->operation);
+  SVN_ERR_ASSERT(operation);
+
+  if (action && reason)
+    {
+      *desc = apr_psprintf(pool, _("%s, %s %s"),
+                           reason, action, operation);
+    }
+  else
+    {
+      /* A catch-all message for very rare or nominally impossible cases.
+         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_token__to_word(map_conflict_reason_xml,
+                                              conflict->reason),
+                           svn_node_kind_to_word(incoming_kind),
+                           svn_token__to_word(map_conflict_action_xml,
+                                              conflict->action),
+                           operation);
+    }
   return SVN_NO_ERROR;
 }
 
@@ -161,23 +308,20 @@ add_conflict_version_xml(svn_stringbuf_t
   apr_hash_t *att_hash = apr_hash_make(pool);
 
 
-  apr_hash_set(att_hash, "side", APR_HASH_KEY_STRING, side);
+  svn_hash_sets(att_hash, "side", side);
 
   if (version->repos_url)
-    apr_hash_set(att_hash, "repos-url", APR_HASH_KEY_STRING,
-                 version->repos_url);
+    svn_hash_sets(att_hash, "repos-url", version->repos_url);
 
   if (version->path_in_repos)
-    apr_hash_set(att_hash, "path-in-repos", APR_HASH_KEY_STRING,
-                 version->path_in_repos);
+    svn_hash_sets(att_hash, "path-in-repos", version->path_in_repos);
 
   if (SVN_IS_VALID_REVNUM(version->peg_rev))
-    apr_hash_set(att_hash, "revision", APR_HASH_KEY_STRING,
-                 apr_ltoa(pool, version->peg_rev));
+    svn_hash_sets(att_hash, "revision", apr_ltoa(pool, version->peg_rev));
 
   if (version->node_kind != svn_node_unknown)
-    apr_hash_set(att_hash, "kind", APR_HASH_KEY_STRING,
-                 svn_cl__node_kind_str_xml(version->node_kind));
+    svn_hash_sets(att_hash, "kind",
+                  svn_cl__node_kind_str_xml(version->node_kind));
 
   svn_xml_make_open_tag_hash(pstr, pool, svn_xml_self_closing,
                              "version", att_hash);
@@ -193,20 +337,20 @@ append_tree_conflict_info_xml(svn_string
   apr_hash_t *att_hash = apr_hash_make(pool);
   const char *tmp;
 
-  apr_hash_set(att_hash, "victim", APR_HASH_KEY_STRING,
-               svn_dirent_basename(conflict->local_abspath, pool));
+  svn_hash_sets(att_hash, "victim",
+                svn_dirent_basename(conflict->local_abspath, pool));
 
-  apr_hash_set(att_hash, "kind", APR_HASH_KEY_STRING,
-               svn_cl__node_kind_str_xml(conflict->node_kind));
+  svn_hash_sets(att_hash, "kind",
+                svn_cl__node_kind_str_xml(conflict->node_kind));
 
-  apr_hash_set(att_hash, "operation", APR_HASH_KEY_STRING,
-               svn_cl__operation_str_xml(conflict->operation, pool));
+  svn_hash_sets(att_hash, "operation",
+                svn_cl__operation_str_xml(conflict->operation, pool));
 
   tmp = svn_token__to_word(map_conflict_action_xml, conflict->action);
-  apr_hash_set(att_hash, "action", APR_HASH_KEY_STRING, tmp);
+  svn_hash_sets(att_hash, "action", tmp);
 
   tmp = svn_token__to_word(map_conflict_reason_xml, conflict->reason);
-  apr_hash_set(att_hash, "reason", APR_HASH_KEY_STRING, tmp);
+  svn_hash_sets(att_hash, "reason", tmp);
 
   /* Open the tree-conflict tag. */
   svn_xml_make_open_tag_hash(&str, pool, svn_xml_normal,
@@ -247,15 +391,15 @@ svn_cl__append_conflict_info_xml(svn_str
 
   att_hash = apr_hash_make(scratch_pool);
 
-  apr_hash_set(att_hash, "operation", APR_HASH_KEY_STRING,
-               svn_cl__operation_str_xml(conflict->operation, scratch_pool));
+  svn_hash_sets(att_hash, "operation",
+                svn_cl__operation_str_xml(conflict->operation, scratch_pool));
 
 
   kind = svn_token__to_word(map_conflict_kind_xml, conflict->kind);
-  apr_hash_set(att_hash, "type", APR_HASH_KEY_STRING, kind);
+  svn_hash_sets(att_hash, "type", kind);
 
-  apr_hash_set(att_hash, "operation", APR_HASH_KEY_STRING,
-               svn_cl__operation_str_xml(conflict->operation, scratch_pool));
+  svn_hash_sets(att_hash, "operation",
+                svn_cl__operation_str_xml(conflict->operation, scratch_pool));
 
 
   /* "<conflict>" */

Modified: subversion/branches/master-passphrase/subversion/svn/cl-conflicts.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/cl-conflicts.h?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/cl-conflicts.h (original)
+++ subversion/branches/master-passphrase/subversion/svn/cl-conflicts.h Fri May 10 14:58:47 2013
@@ -41,6 +41,18 @@ extern "C" {
 
 /**
  * Return in @a desc a possibly localized human readable
+ * description of a property conflict described by @a conflict.
+ *
+ * Allocate the result in @a pool.
+ */
+svn_error_t *
+svn_cl__get_human_readable_prop_conflict_description(
+  const char **desc,
+  const svn_wc_conflict_description2_t *conflict,
+  apr_pool_t *pool);
+
+/**
+ * Return in @a desc a possibly localized human readable
  * description of a tree conflict described by @a conflict.
  *
  * Allocate the result in @a pool.

Modified: subversion/branches/master-passphrase/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/cl.h?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/cl.h (original)
+++ subversion/branches/master-passphrase/subversion/svn/cl.h Fri May 10 14:58:47 2013
@@ -158,7 +158,7 @@ typedef struct svn_cl__opt_state_t
   /* Was --no-unlock specified? */
   svn_boolean_t no_unlock;
 
-  const char *message;           /* log message */
+  const char *message;           /* log message (not converted to UTF-8) */
   svn_boolean_t force;           /* be more forceful, as in "svn rm -f ..." */
   svn_boolean_t force_log;       /* force validity of a suspect log msg file */
   svn_boolean_t incremental;     /* yield output suitable for concatenation */
@@ -168,37 +168,42 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t verbose;         /* be verbose */
   svn_boolean_t update;          /* contact the server for the full story */
   svn_boolean_t strict;          /* do strictly what was requested */
-  svn_stringbuf_t *filedata;     /* contents of file used as option data */
-  const char *encoding;          /* the locale/encoding of the data*/
+  svn_stringbuf_t *filedata;     /* contents of file used as option data
+                                    (not converted to UTF-8) */
+  const char *encoding;          /* the locale/encoding of 'message' and of
+                                    'filedata' (not converted to UTF-8) */
   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! */
+  const char *auth_username;     /* auth username */
+  const char *auth_password;     /* auth password */
+  const char *extensions;        /* subprocess extension args */
+  apr_array_header_t *targets;   /* target list from file */
   svn_boolean_t xml;             /* output in xml, e.g., "svn log --xml" */
   svn_boolean_t no_ignore;       /* disregard default ignores & svn:ignore's */
   svn_boolean_t no_auth_cache;   /* do not cache authentication information */
   struct
     {
-  const char *diff_cmd;          /* the external diff command to use */
-  svn_boolean_t internal_diff;    /* override diff_cmd in config file */
-  svn_boolean_t no_diff_added; /* do not show diffs for deleted files */
-  svn_boolean_t no_diff_deleted; /* do not show diffs for deleted files */
+  const char *diff_cmd;              /* the external diff command to use
+                                        (not converted to UTF-8) */
+  svn_boolean_t internal_diff;       /* override diff_cmd in config file */
+  svn_boolean_t no_diff_added;       /* do not show diffs for deleted files */
+  svn_boolean_t no_diff_deleted;     /* do not show diffs for deleted files */
   svn_boolean_t show_copies_as_adds; /* do not diff copies with their source */
-  svn_boolean_t notice_ancestry; /* notice ancestry for diff-y operations */
-  svn_boolean_t summarize;       /* create a summary of a diff */
+  svn_boolean_t notice_ancestry;     /* notice ancestry for diff-y operations */
+  svn_boolean_t summarize;           /* create a summary of a diff */
   svn_boolean_t use_git_diff_format; /* Use git's extended diff format */
-  svn_boolean_t ignore_properties; /* ignore properties */
-  svn_boolean_t properties_only;   /* Show properties only */
-  svn_boolean_t patch_compatible; /* Output compatible with GNU patch */
+  svn_boolean_t ignore_properties;   /* ignore properties */
+  svn_boolean_t properties_only;     /* Show properties only */
+  svn_boolean_t patch_compatible;    /* Output compatible with GNU patch */
     } diff;
   svn_boolean_t ignore_ancestry; /* ignore ancestry for merge-y operations */
   svn_boolean_t ignore_externals;/* ignore externals definitions */
   svn_boolean_t stop_on_copy;    /* don't cross copies during processing */
   svn_boolean_t dry_run;         /* try operation but make no changes */
   svn_boolean_t revprop;         /* operate on a revision property */
-  const char *merge_cmd;         /* the external merge command to use */
-  const char *editor_cmd;        /* the external editor command to use */
+  const char *merge_cmd;         /* the external merge command to use
+                                    (not converted to UTF-8) */
+  const char *editor_cmd;        /* the external editor command to use
+                                    (not converted to UTF-8) */
   svn_boolean_t record_only;     /* whether to record mergeinfo */
   const char *old_target;        /* diff target */
   const char *new_target;        /* diff target */
@@ -210,30 +215,29 @@ typedef struct svn_cl__opt_state_t
   const char *native_eol;        /* override system standard eol marker */
   svn_boolean_t remove;          /* deassociate a changelist */
   apr_array_header_t *changelists; /* changelist filters */
-  const char *changelist;        /* operate on this changelist
-                                    THIS IS TEMPORARY (LAST OF CHANGELISTS) */
   svn_boolean_t keep_changelists;/* don't remove changelists after commit */
   svn_boolean_t keep_local;      /* delete path only from repository */
   svn_boolean_t all_revprops;    /* retrieve all revprops */
   svn_boolean_t no_revprops;     /* retrieve no revprops */
-  apr_hash_t *revprop_table;     /* table of revision properties to get/set */
+  apr_hash_t *revprop_table;     /* table of revision properties to get/set
+                                    (not converted to UTF-8) */
   svn_boolean_t parents;         /* create intermediate directories */
   svn_boolean_t use_merge_history; /* use/display extra merge information */
-  svn_cl__accept_t accept_which; /* how to handle conflicts */
-  svn_cl__show_revs_t show_revs; /* mergeinfo flavor */
-  svn_depth_t set_depth;         /* new sticky ambient depth value */
-  svn_boolean_t reintegrate;     /* use "reintegrate" merge-source heuristic */
+  svn_cl__accept_t accept_which;   /* how to handle conflicts */
+  svn_cl__show_revs_t show_revs;   /* mergeinfo flavor */
+  svn_depth_t set_depth;           /* new sticky ambient depth value */
+  svn_boolean_t reintegrate;      /* use "reintegrate" merge-source heuristic */
   svn_boolean_t trust_server_cert; /* trust server SSL certs that would
                                       otherwise be rejected as "untrusted" */
   int strip; /* number of leading path components to strip */
-  svn_boolean_t ignore_keywords;  /* do not expand keywords */
-  svn_boolean_t reverse_diff;     /* reverse a diff (e.g. when patching) */
+  svn_boolean_t ignore_keywords;   /* do not expand keywords */
+  svn_boolean_t reverse_diff;      /* reverse a diff (e.g. when patching) */
   svn_boolean_t ignore_whitespace; /* don't account for whitespace when
                                       patching */
-  svn_boolean_t show_diff;        /* produce diff output (maps to --diff) */
-  svn_boolean_t allow_mixed_rev; /* Allow operation on mixed-revision WC */
+  svn_boolean_t show_diff;         /* produce diff output (maps to --diff) */
+  svn_boolean_t allow_mixed_rev;   /* Allow operation on mixed-revision WC */
   svn_boolean_t include_externals; /* Recurses (in)to file & dir externals */
-  svn_boolean_t show_inherited_props; /* get inherited properties */
+  svn_boolean_t show_inherited_props;  /* get inherited properties */
   apr_array_header_t* search_patterns; /* pattern arguments for --search */
 } svn_cl__opt_state_t;
 
@@ -331,6 +335,31 @@ svn_cl__check_cancel(void *baton);
 typedef struct svn_cl__interactive_conflict_baton_t
   svn_cl__interactive_conflict_baton_t;
 
+/* Conflict stats for operations such as update and merge. */
+typedef struct svn_cl__conflict_stats_t svn_cl__conflict_stats_t;
+
+/* Return a new, initialized, conflict stats structure, allocated in
+ * POOL. */
+svn_cl__conflict_stats_t *
+svn_cl__conflict_stats_create(apr_pool_t *pool);
+
+/* Update CONFLICT_STATS to reflect that a conflict on PATH_LOCAL of kind
+ * CONFLICT_KIND is resolved.  (There is no support for updating the
+ * 'skipped paths' stats, since skips cannot be 'resolved'.) */
+void
+svn_cl__conflict_stats_resolved(svn_cl__conflict_stats_t *conflict_stats,
+                                const char *path_local,
+                                svn_wc_conflict_kind_t conflict_kind);
+
+/* Print the conflict stats accumulated in CONFLICT_STATS.
+ *
+ * Return any error encountered during printing.
+ * See also svn_cl__notifier_print_conflict_stats().
+ */
+svn_error_t *
+svn_cl__print_conflict_stats(svn_cl__conflict_stats_t *conflict_stats,
+                             apr_pool_t *scratch_pool);
+
 /* Create and return an baton for use with svn_cl__conflict_func_interactive
  * in *B, allocated from RESULT_POOL, and initialised with the values
  * ACCEPT_WHICH, CONFIG, EDITOR_CMD, CANCEL_FUNC and CANCEL_BATON. */
@@ -340,14 +369,21 @@ svn_cl__get_conflict_func_interactive_ba
   svn_cl__accept_t accept_which,
   apr_hash_t *config,
   const char *editor_cmd,
+  svn_cl__conflict_stats_t *conflict_stats,
   svn_cancel_func_t cancel_func,
   void *cancel_baton,
   apr_pool_t *result_pool);
 
-/* A conflict-resolution callback which prompts the user to choose
-   one of the 3 fulltexts, edit the merged file on the spot, or just
-   skip the conflict (to be resolved later).
-   Implements @c svn_wc_conflict_resolver_func_t. */
+/* A callback capable of doing interactive conflict resolution.
+
+   The BATON must come from svn_cl__get_conflict_func_interactive_baton().
+   Resolves based on the --accept option if one was given to that function,
+   otherwise prompts the user to choose one of the three fulltexts, edit
+   the merged file on the spot, or just skip the conflict (to be resolved
+   later), among other options.
+
+   Implements svn_wc_conflict_resolver_func2_t.
+ */
 svn_error_t *
 svn_cl__conflict_func_interactive(svn_wc_conflict_result_t **result,
                                   const svn_wc_conflict_description2_t *desc,
@@ -355,44 +391,6 @@ svn_cl__conflict_func_interactive(svn_wc
                                   apr_pool_t *result_pool,
                                   apr_pool_t *scratch_pool);
 
-/* Create and return a baton for use with svn_cl__conflict_func_postpone()
- * and svn_cl__resolve_postponed_conflicts(), allocated in RESULT_POOL.
- */
-void *
-svn_cl__get_conflict_func_postpone_baton(apr_pool_t *result_pool);
-
-/* A conflict-resolution callback which postpones all conflicts and
- * remembers conflicted paths in BATON.  BATON must have been obtained
- * from svn_cl__get_conflict_func_postpone_baton().
- *
- * Implements svn_wc_conflict_resolver_func2_t.
- */
-svn_error_t *
-svn_cl__conflict_func_postpone(svn_wc_conflict_result_t **result,
-                               const svn_wc_conflict_description2_t *desc,
-                               void *baton,
-                               apr_pool_t *result_pool,
-                               apr_pool_t *scratch_pool);
-
-/* Perform conflict resolution on any conflicted paths stored in the BATON
- * which was obtained from svn_cl__get_conflict_func_postpone_baton().
- *
- * If CONFLICTS_ALL_RESOLVED is not null, set *CONFLICTS_ALL_RESOLVED to
- * true if this resolves all the conflicts on the paths that were
- * recorded (or if none were recorded); or to false if some conflicts
- * remain.
- *
- * The conflict resolution will be interactive if ACCEPT_WHICH is
- * svn_cl__accept_unspecified.
- */
-svn_error_t *
-svn_cl__resolve_postponed_conflicts(svn_boolean_t *conflicts_all_resolved,
-                                    void *baton,
-                                    svn_cl__accept_t accept_which,
-                                    const char *editor_cmd,
-                                    svn_client_ctx_t *ctx,
-                                    apr_pool_t *scratch_pool);
-
 
 /*** Command-line output functions -- printing to the user. ***/
 
@@ -548,6 +546,7 @@ svn_cl__merge_file(const char *base_path
 svn_error_t *
 svn_cl__get_notifier(svn_wc_notify_func2_t *notify_func_p,
                      void **notify_baton_p,
+                     svn_cl__conflict_stats_t *conflict_stats,
                      apr_pool_t *pool);
 
 /* Make the notifier for use with BATON print the appropriate summary
@@ -583,21 +582,17 @@ svn_cl__check_externals_failed_notify_wr
                                               const svn_wc_notify_t *n,
                                               apr_pool_t *pool);
 
-/* Reset to zero the conflict stats accumulated in BATON, which is the
- * notifier baton from svn_cl__get_notifier().
- */
-svn_error_t *
-svn_cl__notifier_reset_conflict_stats(void *baton);
-
-/* Print the conflict stats accumulated in BATON, which is the
- * notifier baton from svn_cl__get_notifier().
+/* Print the conflict stats accumulated in BATON, which is the
+ * notifier baton from svn_cl__get_notifier().  This is just like
+ * calling svn_cl__print_conflict_stats().
+ *
  * Return any error encountered during printing.
  */
 svn_error_t *
 svn_cl__notifier_print_conflict_stats(void *baton, apr_pool_t *scratch_pool);
 
 
-/*** Log message callback stuffs. ***/
+/*** Log message callback stuffs. ***/
 
 /* Allocate in POOL a baton for use with svn_cl__get_log_message().
 
@@ -703,6 +698,17 @@ const char *
 svn_cl__operation_str_human_readable(svn_wc_operation_t operation,
                                      apr_pool_t *pool);
 
+
+/* What use is a property name intended for.
+   Used by svn_cl__check_svn_prop_name to customize error messages. */
+typedef enum svn_cl__prop_use_e
+  {
+    svn_cl__prop_use_set,       /* setting the property */
+    svn_cl__prop_use_edit,      /* editing the property */
+    svn_cl__prop_use_use        /* using the property name */
+  }
+svn_cl__prop_use_t;
+
 /* If PROPNAME looks like but is not identical to one of the svn:
  * poperties, raise an error and suggest a better spelling. Names that
  * raise errors look like this:
@@ -717,7 +723,9 @@ svn_cl__operation_str_human_readable(svn
  * Use SCRATCH_POOL for temporary allocations.
  */
 svn_error_t *
-svn_cl__check_svn_prop_name(const char *propname, svn_boolean_t revprop,
+svn_cl__check_svn_prop_name(const char *propname,
+                            svn_boolean_t revprop,
+                            svn_cl__prop_use_t prop_use,
                             apr_pool_t *scratch_pool);
 
 /* If PROPNAME is one of the svn: properties with a boolean value, and
@@ -841,6 +849,16 @@ svn_cl__propset_print_binary_mime_type_w
                                                const svn_string_t *propval,
                                                apr_pool_t *scratch_pool);
 
+/* A wrapper around the deprecated svn_client_merge_reintegrate. */
+svn_error_t *
+svn_cl__deprecated_merge_reintegrate(const char *source_path_or_url,
+                                     const svn_opt_revision_t *src_peg_revision,
+                                     const char *target_wcpath,
+                                     svn_boolean_t dry_run,
+                                     const apr_array_header_t *merge_options,
+                                     svn_client_ctx_t *ctx,
+                                     apr_pool_t *pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/master-passphrase/subversion/svn/client_errors.h
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/client_errors.h?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/client_errors.h (original)
+++ subversion/branches/master-passphrase/subversion/svn/client_errors.h Fri May 10 14:58:47 2013
@@ -43,6 +43,8 @@ extern "C" {
 
 #if defined(SVN_ERROR_BUILD_ARRAY)
 
+#error "Need to update err_defn for r1464679 and un-typo 'CDMLINE'"
+
 #define SVN_ERROR_START \
         static const err_defn error_table[] = { \
           { SVN_ERR_CDMLINE__WARNING, "Warning" },

Modified: subversion/branches/master-passphrase/subversion/svn/commit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/commit-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/commit-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/commit-cmd.c Fri May 10 14:58:47 2013
@@ -29,6 +29,7 @@
 
 #include <apr_general.h>
 
+#include "svn_hash.h"
 #include "svn_error.h"
 #include "svn_error_codes.h"
 #include "svn_wc.h"
@@ -136,8 +137,7 @@ svn_cl__commit(apr_getopt_t *os,
   if (opt_state->depth == svn_depth_unknown)
     opt_state->depth = svn_depth_infinity;
 
-  cfg = apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
-                     APR_HASH_KEY_STRING);
+  cfg = svn_hash_gets(ctx->config, SVN_CONFIG_CATEGORY_CONFIG);
   if (cfg)
     SVN_ERR(svn_config_get_bool(cfg, &no_unlock,
                                 SVN_CONFIG_SECTION_MISCELLANY,

Modified: subversion/branches/master-passphrase/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/conflict-callbacks.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/conflict-callbacks.c Fri May 10 14:58:47 2013
@@ -27,12 +27,14 @@
 #define APR_WANT_STRFUNC
 #include <apr_want.h>
 
+#include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_client.h"
 #include "svn_dirent_uri.h"
 #include "svn_types.h"
 #include "svn_pools.h"
 #include "svn_sorts.h"
+#include "svn_utf.h"
 
 #include "cl.h"
 #include "cl-conflicts.h"
@@ -53,6 +55,8 @@ struct svn_cl__interactive_conflict_bato
   svn_cmdline_prompt_baton_t *pb;
   const char *path_prefix;
   svn_boolean_t quit;
+  svn_cl__conflict_stats_t *conflict_stats;
+  svn_boolean_t printed_summary;
 };
 
 svn_error_t *
@@ -61,6 +65,7 @@ svn_cl__get_conflict_func_interactive_ba
   svn_cl__accept_t accept_which,
   apr_hash_t *config,
   const char *editor_cmd,
+  svn_cl__conflict_stats_t *conflict_stats,
   svn_cancel_func_t cancel_func,
   void *cancel_baton,
   apr_pool_t *result_pool)
@@ -77,6 +82,8 @@ svn_cl__get_conflict_func_interactive_ba
   (*b)->pb = pb;
   SVN_ERR(svn_dirent_get_absolute(&(*b)->path_prefix, "", result_pool));
   (*b)->quit = FALSE;
+  (*b)->conflict_stats = conflict_stats;
+  (*b)->printed_summary = FALSE;
 
   return SVN_NO_ERROR;
 }
@@ -121,9 +128,11 @@ svn_cl__accept_from_word(const char *wor
  * corresponding to the conflict described in DESC. */
 static svn_error_t *
 show_diff(const svn_wc_conflict_description2_t *desc,
+          const char *path_prefix,
           apr_pool_t *pool)
 {
   const char *path1, *path2;
+  const char *label1, *label2;
   svn_diff_t *diff;
   svn_stream_t *output;
   svn_diff_file_options_t *options;
@@ -143,19 +152,35 @@ 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)
-        path1 = desc->my_abspath;
+        {
+          path1 = desc->my_abspath;
+          label1 = _("MINE");
+        }
       else
-        path1 = desc->their_abspath;
+        {
+          path1 = desc->their_abspath;
+          label1 = _("THEIRS");
+        }
       path2 = desc->merged_file;
+      label2 = _("MERGED");
     }
   else
     {
       /* There's no merged file, but we can show the
          difference between mine and theirs. */
       path1 = desc->their_abspath;
+      label1 = _("THEIRS");
       path2 = desc->my_abspath;
+      label2 = _("MINE");
     }
 
+  label1 = apr_psprintf(pool, "%s\t- %s",
+                        svn_cl__local_style_skip_ancestor(
+                          path_prefix, path1, pool), label1);
+  label2 = apr_psprintf(pool, "%s\t- %s",
+                        svn_cl__local_style_skip_ancestor(
+                          path_prefix, path2, pool), label2);
+
   options = svn_diff_file_options_create(pool);
   options->ignore_eol_style = TRUE;
   SVN_ERR(svn_stream_for_stdout(&output, pool));
@@ -163,7 +188,7 @@ show_diff(const svn_wc_conflict_descript
                                options, pool));
   return svn_diff_file_output_unified3(output, diff,
                                        path1, path2,
-                                       NULL, NULL,
+                                       label1, label2,
                                        APR_LOCALE_CHARSET,
                                        NULL, FALSE,
                                        pool);
@@ -202,8 +227,85 @@ show_conflicts(const svn_wc_conflict_des
                                      pool);
 }
 
+/* Perform a 3-way merge of the conflicting values of a property,
+ * and write the result to the OUTPUT stream.
+ *
+ * If MERGED_ABSPATH is non-NULL, use it as 'my' version instead of
+ * DESC->MY_ABSPATH.
+ *
+ * Assume the values are printable UTF-8 text.
+ */
+static svn_error_t *
+merge_prop_conflict(svn_stream_t *output,
+                    const svn_wc_conflict_description2_t *desc,
+                    const char *merged_abspath,
+                    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;
+  svn_diff_file_options_t *options = svn_diff_file_options_create(pool);
+  svn_diff_t *diff;
+
+  /* If any of the property values is missing, use an empty file instead
+   * for the purpose of showing a diff. */
+  if (! base_abspath || ! my_abspath || ! their_abspath)
+    {
+      const char *empty_file;
+
+      SVN_ERR(svn_io_open_unique_file3(NULL, &empty_file,
+                                       NULL, svn_io_file_del_on_pool_cleanup,
+                                       pool, pool));
+      if (! base_abspath)
+        base_abspath = empty_file;
+      if (! my_abspath)
+        my_abspath = empty_file;
+      if (! their_abspath)
+        their_abspath = empty_file;
+    }
+
+  options->ignore_eol_style = TRUE;
+  SVN_ERR(svn_diff_file_diff3_2(&diff,
+                                base_abspath,
+                                merged_abspath ? merged_abspath : my_abspath,
+                                their_abspath,
+                                options, pool));
+  SVN_ERR(svn_diff_file_output_merge2(output, diff,
+                                      base_abspath,
+                                      merged_abspath ? merged_abspath
+                                                     : my_abspath,
+                                      their_abspath,
+                                      _("||||||| ORIGINAL"),
+                                      _("<<<<<<< MINE"),
+                                      _(">>>>>>> THEIRS"),
+                                      "=======",
+                                      svn_diff_conflict_display_modified_original_latest,
+                                      pool));
+
+  return SVN_NO_ERROR;
+}
+
+/* Display the conflicting values of a property as a 3-way diff.
+ *
+ * If MERGED_ABSPATH is non-NULL, show it as 'my' version instead of
+ * DESC->MY_ABSPATH.
+ *
+ * Assume the values are printable UTF-8 text.
+ */
+static svn_error_t *
+show_prop_conflict(const svn_wc_conflict_description2_t *desc,
+                   const char *merged_abspath,
+                   apr_pool_t *pool)
+{
+  svn_stream_t *output;
+
+  SVN_ERR(svn_stream_for_stdout(&output, pool));
+  SVN_ERR(merge_prop_conflict(output, desc, merged_abspath, pool));
+
+  return SVN_NO_ERROR;
+}
 
-/* Run an external editor, passing it the 'merged' file in DESC, or, if the
+/* Run an external editor, passing it the MERGED_FILE, or, if the
  * 'merged' file is null, return an error. The tool to use is determined by
  * B->editor_cmd, B->config and environment variables; see
  * svn_cl__edit_file_externally() for details.
@@ -214,15 +316,15 @@ show_conflicts(const svn_wc_conflict_des
  * return that error. */
 static svn_error_t *
 open_editor(svn_boolean_t *performed_edit,
-            const svn_wc_conflict_description2_t *desc,
+            const char *merged_file,
             svn_cl__interactive_conflict_baton_t *b,
             apr_pool_t *pool)
 {
   svn_error_t *err;
 
-  if (desc->merged_file)
+  if (merged_file)
     {
-      err = svn_cmdline__edit_file_externally(desc->merged_file, b->editor_cmd,
+      err = svn_cmdline__edit_file_externally(merged_file, b->editor_cmd,
                                               b->config, pool);
       if (err && (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_EDITOR))
         {
@@ -255,6 +357,34 @@ open_editor(svn_boolean_t *performed_edi
   return SVN_NO_ERROR;
 }
 
+/* Run an external editor, passing it the 'merged' property in DESC.
+ * The tool to use is determined by B->editor_cmd, B->config and
+ * environment variables; see svn_cl__edit_file_externally() for details. */
+static svn_error_t *
+edit_prop_conflict(const char **merged_file_path,
+                   const svn_wc_conflict_description2_t *desc,
+                   svn_cl__interactive_conflict_baton_t *b,
+                   apr_pool_t *result_pool,
+                   apr_pool_t *scratch_pool)
+{
+  apr_file_t *file;
+  const char *file_path;
+  svn_boolean_t performed_edit = FALSE;
+  svn_stream_t *merged_prop;
+
+  SVN_ERR(svn_io_open_unique_file3(&file, &file_path, NULL,
+                                   svn_io_file_del_on_pool_cleanup,
+                                   result_pool, scratch_pool));
+  merged_prop = svn_stream_from_aprfile2(file, TRUE /* disown */,
+                                         scratch_pool);
+  SVN_ERR(merge_prop_conflict(merged_prop, desc, NULL, scratch_pool));
+  SVN_ERR(svn_stream_close(merged_prop));
+  SVN_ERR(svn_io_file_flush_to_disk(file, scratch_pool));
+  SVN_ERR(open_editor(&performed_edit, file_path, b, scratch_pool));
+  *merged_file_path = (performed_edit ? file_path : NULL);
+
+  return SVN_NO_ERROR;
+}
 
 /* Run an external merge tool, passing it the 'base', 'their', 'my' and
  * 'merged' files in DESC. The tool to use is determined by B->config and
@@ -308,7 +438,7 @@ launch_resolver(svn_boolean_t *performed
 typedef struct resolver_option_t
 {
   const char *code;        /* one or two characters */
-  const char *short_desc;  /* short description */
+  const char *short_desc;  /* label in prompt (localized) */
   const char *long_desc;   /* longer description (localized) */
   svn_wc_conflict_choice_t choice;  /* or -1 if not a simple choice */
 } resolver_option_t;
@@ -317,118 +447,146 @@ typedef struct resolver_option_t
 /* (opt->code == "" causes a blank line break in help_string()) */
 static const resolver_option_t text_conflict_options[] =
 {
-  { "e",  "edit",             N_("change merged file in an editor"), -1 },
-  { "df", "diff-full",        N_("show all changes made to merged file"), -1 },
-  { "r",  "resolved",         N_("accept merged version of file"),
-                              svn_wc_conflict_choose_merged },
-  { "",   "",                 "", svn_wc_conflict_choose_unspecified },
-  { "dc", "display-conflict", N_("show all conflicts (ignoring merged version)"), -1 },
-  { "mc", "mine-conflict",    N_("accept my version for all conflicts (same)"),
-                              svn_wc_conflict_choose_mine_conflict },
-  { "tc", "theirs-conflict",  N_("accept their version for all conflicts (same)"),
-                              svn_wc_conflict_choose_theirs_conflict },
-  { "",   "",                 "", svn_wc_conflict_choose_unspecified },
-  { "mf", "mine-full",        N_("accept my version of entire file (even "
-                                 "non-conflicts)"),
-                              svn_wc_conflict_choose_mine_full },
-  { "tf", "theirs-full",      N_("accept their version of entire file (same)"),
-                              svn_wc_conflict_choose_theirs_full },
-  { "",   "",                 "", svn_wc_conflict_choose_unspecified },
-  { "p",  "postpone",         N_("mark the conflict to be resolved later"),
-                              svn_wc_conflict_choose_postpone },
-  { "m",  "merge",            N_("use internal merge tool to resolve conflict"), -1 },
-  { "l",  "launch",           N_("launch external tool to resolve conflict"), -1 },
-  { "q",  "quit",             N_("postpone all remaining conflicts"),
-                              svn_wc_conflict_choose_postpone },
-  { "s",  "show all options", N_("show this list (also 'h', '?')"), -1 },
+  /* 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. */
+  { "e",  N_("edit file"),        N_("change merged file in an editor"
+                                     "  [edit]"),
+                                  -1 },
+  { "df", N_("show diff"),        N_("show all changes made to merged file"),
+                                  -1 },
+  { "r",  N_("resolved"),         N_("accept merged version of file"),
+                                  svn_wc_conflict_choose_merged },
+  { "",   "",                     "", svn_wc_conflict_choose_unspecified },
+  { "dc", N_("display conflict"), N_("show all conflicts "
+                                     "(ignoring merged version)"), -1 },
+  { "mc", N_("my side of conflict"), N_("accept my version for all conflicts "
+                                        "(same)  [mine-conflict]"),
+                                  svn_wc_conflict_choose_mine_conflict },
+  { "tc", N_("their side of conflict"), N_("accept their version for all "
+                                           "conflicts (same)"
+                                           "  [theirs-conflict]"),
+                                  svn_wc_conflict_choose_theirs_conflict },
+  { "",   "",                     "", svn_wc_conflict_choose_unspecified },
+  { "mf", N_("my version"),       N_("accept my version of entire file (even "
+                                     "non-conflicts)  [mine-full]"),
+                                  svn_wc_conflict_choose_mine_full },
+  { "tf", N_("their version"),    N_("accept their version of entire file "
+                                     "(same)  [theirs-full]"),
+                                  svn_wc_conflict_choose_theirs_full },
+  { "",   "",                     "", svn_wc_conflict_choose_unspecified },
+  { "p",  N_("postpone"),         N_("mark the conflict to be resolved later"
+                                     "  [postpone]"),
+                                  svn_wc_conflict_choose_postpone },
+  { "m",  N_("merge"),            N_("use internal merge tool to resolve "
+                                     "conflict"), -1 },
+  { "l",  N_("launch tool"),      N_("launch external tool to resolve "
+                                     "conflict  [launch]"), -1 },
+  { "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', '?')"), -1 },
   { NULL }
 };
 
 /* Resolver options for a property conflict */
 static const resolver_option_t prop_conflict_options[] =
 {
-  { "p",  "postpone",         N_("mark the conflict to be resolved later"),
-                              svn_wc_conflict_choose_postpone },
-  { "mf", "mine-full",        N_("accept my version of entire file (even "
-                                "non-conflicts)"),
-                              svn_wc_conflict_choose_mine_full },
-  { "tf", "theirs-full",      N_("accept their version of entire file (same)"),
-                              svn_wc_conflict_choose_theirs_full },
-  { "q",  "quit",             N_("postpone all remaining conflicts"),
-                              svn_wc_conflict_choose_postpone },
-  { "h",  "help",             N_("show this help (also '?')"), -1 },
+  { "p",  N_("postpone"),         N_("mark the conflict to be resolved later"
+                                     "  [postpone]"),
+                                  svn_wc_conflict_choose_postpone },
+  { "mf", N_("my version"),       N_("accept my version of entire property (even "
+                                     "non-conflicts)  [mine-full]"),
+                                  svn_wc_conflict_choose_mine_full },
+  { "tf", N_("their version"),    N_("accept their version of entire property "
+                                     "(same)  [theirs-full]"),
+                                  svn_wc_conflict_choose_theirs_full },
+  { "dc", N_("display conflict"), N_("show conflicts in this property"), -1 },
+  { "e",  N_("edit property"),    N_("change merged property value in an editor"
+                                     "  [edit]"), -1 },
+  { "r",  N_("resolved"),         N_("accept edited version of property"),
+                                  svn_wc_conflict_choose_merged },
+  { "q",  N_("quit resolution"),  N_("postpone all remaining conflicts"),
+                                  svn_wc_conflict_choose_postpone },
+  { "h",  N_("help"),             N_("show this help (also '?')"), -1 },
   { NULL }
 };
 
 /* Resolver options for an obstructued addition */
 static const resolver_option_t obstructed_add_options[] =
 {
-  { "p",  "postpone",         N_("resolve the conflict later"),
-                              svn_wc_conflict_choose_postpone },
-  { "mf", "mine-full",        N_("accept pre-existing item (ignore upstream addition)"),
-                              svn_wc_conflict_choose_mine_full },
-  { "tf", "theirs-full",      N_("accept incoming item (overwrite pre-existing item)"),
-                              svn_wc_conflict_choose_theirs_full },
-  { "q",  "quit",             N_("postpone all remaining conflicts"),
-                              svn_wc_conflict_choose_postpone },
-  { "h",  "help",             N_("show this help (also '?')"), -1 },
+  { "p",  N_("postpone"),         N_("mark the conflict to be resolved later"
+                                     "  [postpone]"),
+                                  svn_wc_conflict_choose_postpone },
+  { "mf", N_("my version"),       N_("accept pre-existing item (ignore "
+                                     "upstream addition)  [mine-full]"),
+                                  svn_wc_conflict_choose_mine_full },
+  { "tf", N_("their version"),    N_("accept incoming item (overwrite "
+                                     "pre-existing item)  [theirs-full]"),
+                                  svn_wc_conflict_choose_theirs_full },
+  { "q",  N_("quit resolution"),  N_("postpone all remaining conflicts"),
+                                  svn_wc_conflict_choose_postpone },
+  { "h",  N_("help"),             N_("show this help (also '?')"), -1 },
   { NULL }
 };
 
 /* Resolver options for a tree conflict */
 static const resolver_option_t tree_conflict_options[] =
 {
-  { "p",  "postpone",         N_("resolve the conflict later"),
-                              svn_wc_conflict_choose_postpone },
-  { "r",  "resolved",         N_("accept current working copy state"),
-                              svn_wc_conflict_choose_merged },
-  { "q",  "quit",             N_("postpone all remaining conflicts"),
-                              svn_wc_conflict_choose_postpone },
-  { "h",  "help",             N_("show this help (also '?')"), -1 },
+  { "p",  N_("postpone"),         N_("resolve the conflict later  [postpone]"),
+                                  svn_wc_conflict_choose_postpone },
+  { "r",  N_("resolved"),         N_("accept current working copy state"),
+                                  svn_wc_conflict_choose_merged },
+  { "q",  N_("quit resolution"),  N_("postpone all remaining conflicts"),
+                                  svn_wc_conflict_choose_postpone },
+  { "h",  N_("help"),             N_("show this help (also '?')"), -1 },
   { NULL }
 };
 
 static const resolver_option_t tree_conflict_options_update_moved_away[] =
 {
-  { "p",  "postpone",         N_("resolve the conflict later"),
-                              svn_wc_conflict_choose_postpone },
-  { "mc", "mine-conflict",    N_("apply update to the move destination"),
-                              svn_wc_conflict_choose_mine_conflict },
-  { "r",  "resolved",         N_("mark resolved (the move will become a copy)"),
-                              svn_wc_conflict_choose_merged },
-  { "q",  "quit",             N_("postpone all remaining conflicts"),
-                              svn_wc_conflict_choose_postpone },
-  { "h",  "help",             N_("show this help (also '?')"), -1 },
+  { "p",  N_("postpone"),         N_("resolve the conflict later  [postpone]"),
+                                  svn_wc_conflict_choose_postpone },
+  { "mc", N_("my side of conflict"), N_("apply update to the move destination"
+                                        "  [mine-conflict]"),
+                                  svn_wc_conflict_choose_mine_conflict },
+  { "r",  N_("resolved"),         N_("mark resolved "
+                                     "(the move will become a copy)"),
+                                  svn_wc_conflict_choose_merged },
+  { "q",  N_("quit resolution"),  N_("postpone all remaining conflicts"),
+                                  svn_wc_conflict_choose_postpone },
+  { "h",  N_("help"),             N_("show this help (also '?')"), -1 },
   { NULL }
 };
 
 static const resolver_option_t tree_conflict_options_update_deleted[] =
 {
-  { "p",  "postpone",         N_("resolve the conflict later"),
-                              svn_wc_conflict_choose_postpone },
-  { "mc", "mine-conflict",    N_("keep any moves affected by this deletion"),
-                              svn_wc_conflict_choose_mine_conflict },
-  { "r",  "resolved",         N_("mark resolved (any affected moves will "
-                                 "become copies)"),
-                              svn_wc_conflict_choose_merged },
-  { "q",  "quit",             N_("postpone all remaining conflicts"),
-                              svn_wc_conflict_choose_postpone },
-  { "h",  "help",             N_("show this help (also '?')"), -1 },
+  { "p",  N_("postpone"),         N_("resolve the conflict later  [postpone]"),
+                                  svn_wc_conflict_choose_postpone },
+  { "mc", N_("my side of conflict"), N_("keep any moves affected "
+                                        "by this deletion  [mine-conflict]"),
+                                  svn_wc_conflict_choose_mine_conflict },
+  { "r",  N_("resolved"),         N_("mark resolved (any affected moves will "
+                                     "become copies)"),
+                                  svn_wc_conflict_choose_merged },
+  { "q",  N_("quit resolution"),  N_("postpone all remaining conflicts"),
+                                  svn_wc_conflict_choose_postpone },
+  { "h",  N_("help"),             N_("show this help (also '?')"), -1 },
   { NULL }
 };
 
 static const resolver_option_t tree_conflict_options_update_replaced[] =
 {
-  { "p",  "postpone",         N_("resolve the conflict later"),
-                              svn_wc_conflict_choose_postpone },
-  { "mc", "mine-conflict",    N_("keep any moves affected by this replacement"),
-                              svn_wc_conflict_choose_mine_conflict },
-  { "r",  "resolved",         N_("mark resolved (any affected moves will "
-                                 "become copies)"),
-                              svn_wc_conflict_choose_merged },
-  { "q",  "quit",             N_("postpone all remaining conflicts"),
-                              svn_wc_conflict_choose_postpone },
-  { "h",  "help",             N_("show this help (also '?')"), -1 },
+  { "p",  N_("postpone"),         N_("resolve the conflict later  [postpone]"),
+                                  svn_wc_conflict_choose_postpone },
+  { "mc", N_("my side of conflict"), N_("keep any moves affected by this "
+                                        "replacement  [mine-conflict]"),
+                                  svn_wc_conflict_choose_mine_conflict },
+  { "r",  N_("resolved"),         N_("mark resolved (any affected moves will "
+                                     "become copies)"),
+                                  svn_wc_conflict_choose_merged },
+  { "q",  N_("quit resolution"),  N_("postpone all remaining conflicts"),
+                                  svn_wc_conflict_choose_postpone },
+  { "h",  N_("help"),             N_("show this help (also '?')"), -1 },
   { NULL }
 };
 
@@ -457,14 +615,17 @@ prompt_string(const resolver_option_t *o
               const char *const *option_codes,
               apr_pool_t *pool)
 {
-  const char *result = "Select:";
-  int this_line_len = strlen(result);
+  const char *result = _("Select:");
+  int left_margin = svn_utf_cstring_utf8_width(result);
+  const char *line_sep = apr_psprintf(pool, "\n%*s", left_margin, "");
+  int this_line_len = left_margin;
   svn_boolean_t first = TRUE;
 
   while (1)
     {
       const resolver_option_t *opt;
       const char *s;
+      int slen;
 
       if (option_codes)
         {
@@ -481,16 +642,17 @@ prompt_string(const resolver_option_t *o
 
       if (! first)
         result = apr_pstrcat(pool, result, ",", (char *)NULL);
+      s = apr_psprintf(pool, _(" (%s) %s"),
+                       opt->code, _(opt->short_desc));
+      slen = svn_utf_cstring_utf8_width(s);
       /* Break the line if adding the next option would make it too long */
-      if ((this_line_len + strlen(opt->short_desc) + 6) > MAX_PROMPT_WIDTH)
+      if (this_line_len + slen > MAX_PROMPT_WIDTH)
         {
-          result = apr_pstrcat(pool, result, "\n       ", (char *)NULL);
-          this_line_len = 7;
+          result = apr_pstrcat(pool, result, line_sep, (char *)NULL);
+          this_line_len = left_margin;
         }
-      s = apr_psprintf(pool, " (%s) %s",
-                       opt->code, opt->short_desc);
       result = apr_pstrcat(pool, result, s, (char *)NULL);
-      this_line_len += strlen(s);
+      this_line_len += slen;
       first = FALSE;
     }
   return apr_pstrcat(pool, result, ": ", (char *)NULL);
@@ -511,14 +673,18 @@ help_string(const resolver_option_t *opt
         {
           const char *s = apr_psprintf(pool, "  (%s)", opt->code);
 
-          result = apr_psprintf(pool, "%s%-6s %-16s - %s\n",
-                                result, s, opt->short_desc, opt->long_desc);
+          result = apr_psprintf(pool, "%s%-6s - %s\n",
+                                result, s, _(opt->long_desc));
         }
       else
         {
           result = apr_pstrcat(pool, result, "\n", (char *)NULL);
         }
     }
+  result = apr_pstrcat(pool, result,
+                       _("Words in square brackets are the corresponding "
+                         "--accept option arguments.\n"),
+                       (char *)NULL);
   return result;
 }
 
@@ -542,20 +708,22 @@ prompt_user(const resolver_option_t **op
   const char *answer;
 
   SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, prompt_baton, scratch_pool));
-  *opt = find_option(conflict_options, answer);
-
-  if (! *opt)
-    {
-      SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
-                                  _("Unrecognized option.\n\n")));
-    }
-  else if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
+  if (strcmp(answer, "h") == 0 || strcmp(answer, "?") == 0)
     {
       SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "\n%s\n",
                                   help_string(conflict_options,
                                               scratch_pool)));
       *opt = NULL;
     }
+  else
+    {
+      *opt = find_option(conflict_options, answer);
+      if (! *opt)
+        {
+          SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
+                                      _("Unrecognized option.\n\n")));
+        }
+    }
   return SVN_NO_ERROR;
 }
 
@@ -677,12 +845,12 @@ handle_text_conflict(svn_wc_conflict_res
               continue;
             }
 
-          SVN_ERR(show_diff(desc, iterpool));
+          SVN_ERR(show_diff(desc, b->path_prefix, iterpool));
           knows_something = TRUE;
         }
       else if (strcmp(opt->code, "e") == 0 || strcmp(opt->code, ":-E") == 0)
         {
-          SVN_ERR(open_editor(&performed_edit, desc, b, iterpool));
+          SVN_ERR(open_editor(&performed_edit, desc->merged_file, b, iterpool));
           if (performed_edit)
             knows_something = TRUE;
         }
@@ -782,9 +950,19 @@ static svn_error_t *
 handle_prop_conflict(svn_wc_conflict_result_t *result,
                      const svn_wc_conflict_description2_t *desc,
                      svn_cl__interactive_conflict_baton_t *b,
+                     apr_pool_t *result_pool,
                      apr_pool_t *scratch_pool)
 {
   apr_pool_t *iterpool;
+  const char *message;
+  const char *merged_file_path = NULL;
+  svn_boolean_t resolved_allowed = FALSE;
+
+  /* ### Work around a historical bug in the provider: the path to the
+   *     conflict description file was put in the 'theirs' field, and
+   *     'theirs' was put in the 'merged' field. */
+  ((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);
 
@@ -796,41 +974,31 @@ handle_prop_conflict(svn_wc_conflict_res
                                 b->path_prefix, desc->local_abspath,
                                 scratch_pool)));
 
-  /* ### Currently, the only useful information in a prop conflict
-   * ### description is the .prej file path, which, possibly due to
-   * ### deceitful interference from outer space, is stored in the
-   * ### 'their_abspath' field of the description.
-   * ### This needs to be fixed so we can present better options here. */
-  if (desc->their_abspath)
-    {
-      svn_stringbuf_t *prop_reject;
-
-      /* ### The library dumps an svn_string_t into a temp file, and
-       * ### we read it back from the file into an svn_stringbuf_t here.
-       * ### That's rather silly. We should be passed svn_string_t's
-       * ### containing the old/mine/theirs values instead. */
-      SVN_ERR(svn_stringbuf_from_file2(&prop_reject,
-                                       desc->their_abspath,
-                                       scratch_pool));
-      /* Print reject file contents. */
-      SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool,
-                                  "%s\n", prop_reject->data));
-    }
-  else
-    {
-      /* Nothing much we can do without a prej file... */
-      result->choice = svn_wc_conflict_choose_postpone;
-      return SVN_NO_ERROR;
-    }
+  SVN_ERR(svn_cl__get_human_readable_prop_conflict_description(&message, desc,
+                                                               scratch_pool));
+  SVN_ERR(svn_cmdline_fprintf(stderr, scratch_pool, "%s\n", message));
 
   iterpool = svn_pool_create(scratch_pool);
   while (TRUE)
     {
       const resolver_option_t *opt;
+      const char *options[ARRAY_LEN(prop_conflict_options)];
+      const char **next_option = options;
+
+      *next_option++ = "p";
+      *next_option++ = "mf";
+      *next_option++ = "tf";
+      *next_option++ = "dc";
+      *next_option++ = "e";
+      if (resolved_allowed)
+        *next_option++ = "r";
+      *next_option++ = "q";
+      *next_option++ = "h";
+      *next_option++ = NULL;
 
       svn_pool_clear(iterpool);
 
-      SVN_ERR(prompt_user(&opt, prop_conflict_options, NULL, b->pb,
+      SVN_ERR(prompt_user(&opt, prop_conflict_options, options, b->pb,
                           iterpool));
       if (! opt)
         continue;
@@ -842,6 +1010,30 @@ handle_prop_conflict(svn_wc_conflict_res
           b->quit = TRUE;
           break;
         }
+      else if (strcmp(opt->code, "dc") == 0)
+        {
+          SVN_ERR(show_prop_conflict(desc, merged_file_path, scratch_pool));
+        }
+      else if (strcmp(opt->code, "e") == 0)
+        {
+          SVN_ERR(edit_prop_conflict(&merged_file_path, desc, b,
+                                     result_pool, scratch_pool));
+          resolved_allowed = (merged_file_path != NULL);
+        }
+      else if (strcmp(opt->code, "r") == 0)
+        {
+          if (! resolved_allowed)
+            {
+              SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
+                             _("Invalid option; please edit the property "
+                               "first.\n\n")));
+              continue;
+            }
+
+          result->merged_file = merged_file_path;
+          result->choice = svn_wc_conflict_choose_merged;
+          break;
+        }
       else if (opt->choice != -1)
         {
           result->choice = opt->choice;
@@ -971,14 +1163,13 @@ handle_obstructed_add(svn_wc_conflict_re
   return SVN_NO_ERROR;
 }
 
-/* Implement svn_wc_conflict_resolver_func2_t; resolves based on
-   --accept option if given, else by prompting. */
-svn_error_t *
-svn_cl__conflict_func_interactive(svn_wc_conflict_result_t **result,
-                                  const svn_wc_conflict_description2_t *desc,
-                                  void *baton,
-                                  apr_pool_t *result_pool,
-                                  apr_pool_t *scratch_pool)
+/* The body of svn_cl__conflict_func_interactive(). */
+static svn_error_t *
+conflict_func_interactive(svn_wc_conflict_result_t **result,
+                          const svn_wc_conflict_description2_t *desc,
+                          void *baton,
+                          apr_pool_t *result_pool,
+                          apr_pool_t *scratch_pool)
 {
   svn_cl__interactive_conflict_baton_t *b = baton;
   svn_error_t *err;
@@ -1106,6 +1297,13 @@ svn_cl__conflict_func_interactive(svn_wc
       break;
     }
 
+  /* Print a summary of conflicts before starting interactive resolution */
+  if (! b->printed_summary)
+    {
+      SVN_ERR(svn_cl__print_conflict_stats(b->conflict_stats, scratch_pool));
+      b->printed_summary = TRUE;
+    }
+
   /* We're in interactive mode and either the user gave no --accept
      option or the option did not apply; let's prompt. */
 
@@ -1114,12 +1312,12 @@ svn_cl__conflict_func_interactive(svn_wc
      Conflicting edits on a file's text, or
      Conflicting edits on a property.
   */
-  if (((desc->node_kind == svn_node_file)
+  if (((desc->kind == svn_wc_conflict_kind_text)
        && (desc->action == svn_wc_conflict_action_edit)
        && (desc->reason == svn_wc_conflict_reason_edited)))
     SVN_ERR(handle_text_conflict(*result, desc, b, scratch_pool));
   else if (desc->kind == svn_wc_conflict_kind_property)
-    SVN_ERR(handle_prop_conflict(*result, desc, b, scratch_pool));
+    SVN_ERR(handle_prop_conflict(*result, desc, b, result_pool, scratch_pool));
 
   /*
     Dealing with obstruction of additions can be tricky.  The
@@ -1155,132 +1353,26 @@ svn_cl__conflict_func_interactive(svn_wc
 }
 
 svn_error_t *
-svn_cl__conflict_func_postpone(svn_wc_conflict_result_t **result,
-                               const svn_wc_conflict_description2_t *desc,
-                               void *baton,
-                               apr_pool_t *result_pool,
-                               apr_pool_t *scratch_pool)
-{
-  apr_hash_t *conflicted_paths = baton;
-  
-  apr_hash_set(conflicted_paths,
-               apr_pstrdup(apr_hash_pool_get(conflicted_paths),
-                           desc->local_abspath),
-               APR_HASH_KEY_STRING, "");
-
-  *result = svn_wc_create_conflict_result(svn_wc_conflict_choose_postpone,
-                                          NULL, result_pool);
-  return SVN_NO_ERROR;
-}
-
-void *
-svn_cl__get_conflict_func_postpone_baton(apr_pool_t *result_pool)
-{
-  return apr_hash_make(result_pool);
-}
-
-static apr_array_header_t *
-get_postponed_conflicted_paths(void *baton, apr_pool_t *result_pool)
-{
-  apr_hash_t *conflicted_paths = baton;
-  apr_array_header_t *sorted_array;
-  apr_array_header_t *result_array;
-  int i;
-
-  sorted_array = svn_sort__hash(conflicted_paths,
-                                svn_sort_compare_items_as_paths,
-                                apr_hash_pool_get(conflicted_paths));
-  result_array = apr_array_make(result_pool, sorted_array->nelts,
-                                sizeof(const char *));
-  for (i = 0; i < sorted_array->nelts; i++)
-    {
-      svn_sort__item_t item;
-      
-      item = APR_ARRAY_IDX(sorted_array, i, svn_sort__item_t);
-      APR_ARRAY_PUSH(result_array, const char *) = apr_pstrdup(result_pool,
-                                                               item.key);
-    }
-
-  return result_array;
-}
-
-svn_error_t *
-svn_cl__resolve_postponed_conflicts(svn_boolean_t *conflicts_all_resolved,
-                                    void *baton,
-                                    svn_cl__accept_t accept_which,
-                                    const char *editor_cmd,
-                                    svn_client_ctx_t *ctx,
-                                    apr_pool_t *scratch_pool)
+svn_cl__conflict_func_interactive(svn_wc_conflict_result_t **result,
+                                  const svn_wc_conflict_description2_t *desc,
+                                  void *baton,
+                                  apr_pool_t *result_pool,
+                                  apr_pool_t *scratch_pool)
 {
-  apr_array_header_t *targets;
-  int i;
-  apr_pool_t *iterpool;
-
-  targets = get_postponed_conflicted_paths(baton, scratch_pool);
+  svn_cl__interactive_conflict_baton_t *b = baton;
 
-  if (conflicts_all_resolved != NULL)
-    *conflicts_all_resolved = TRUE;
+  SVN_ERR(conflict_func_interactive(result, desc, baton,
+                                    result_pool, scratch_pool));
 
-  iterpool = svn_pool_create(scratch_pool);
-  for (i = 0; i < targets->nelts; i++)
+  /* If we are resolving a conflict, adjust the summary of conflicts. */
+  if ((*result)->choice != svn_wc_conflict_choose_postpone)
     {
-      const char *target = APR_ARRAY_IDX(targets, i, const char *);
-      svn_error_t *err = SVN_NO_ERROR;
-      const char *local_abspath;
-      svn_wc_conflict_resolver_func2_t conflict_func2;
-      void *conflict_baton2;
-      svn_cl__interactive_conflict_baton_t *b;
-      svn_boolean_t text_c, prop_c, tree_c;
+      const char *local_path
+        = svn_cl__local_style_skip_ancestor(
+            b->path_prefix, desc->local_abspath, scratch_pool);
 
-      svn_pool_clear(iterpool);
-
-      SVN_ERR(svn_dirent_get_absolute(&local_abspath, target, iterpool));
-
-      /* Store old state */
-      conflict_func2 = ctx->conflict_func2;
-      conflict_baton2 = ctx->conflict_baton2;
-
-      /* Set up the interactive resolver. */
-      ctx->conflict_func2 = svn_cl__conflict_func_interactive;
-      SVN_ERR(svn_cl__get_conflict_func_interactive_baton(&b, accept_which,
-                                                          ctx->config,
-                                                          editor_cmd,
-                                                          ctx->cancel_func,
-                                                          ctx->cancel_baton,
-                                                          scratch_pool));
-      ctx->conflict_baton2 = b;
-
-      err = svn_client_resolve(local_abspath, svn_depth_empty,
-                               svn_wc_conflict_choose_unspecified,
-                               ctx, iterpool);
-
-      /* Restore state */
-      ctx->conflict_func2 = conflict_func2;
-      ctx->conflict_baton2 = conflict_baton2;
-
-      if (err)
-        {
-          if ((err->apr_err != SVN_ERR_WC_NOT_WORKING_COPY)
-              && (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND))
-            return svn_error_trace(err);
-
-          svn_error_clear(err);
-        }
-
-      /* Report if we left any of the conflicts unresolved */
-      if (conflicts_all_resolved != NULL)
-        {
-          SVN_ERR(svn_wc_conflicted_p3(&text_c, &prop_c, &tree_c,
-                                       ctx->wc_ctx, local_abspath,
-                                       scratch_pool));
-          if (text_c || prop_c || tree_c)
-            *conflicts_all_resolved = FALSE;
-        }
-
-      if (b->quit)
-        break;
+      svn_cl__conflict_stats_resolved(b->conflict_stats, local_path,
+                                      desc->kind);
     }
-  svn_pool_destroy(iterpool);
-
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/master-passphrase/subversion/svn/copy-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/copy-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/copy-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/copy-cmd.c Fri May 10 14:58:47 2013
@@ -73,7 +73,7 @@ svn_cl__copy(apr_getopt_t *os,
       if (err)
         {
           /* Issue #3606: 'svn cp .@HEAD target' gives
-             svn: '@HEAD' is just a peg revision. Maybe try '@HEAD@' instead? 
+             svn: '@HEAD' is just a peg revision. Maybe try '@HEAD@' instead?
 
              This is caused by a first round of canonicalization in
              svn_cl__args_to_target_array_print_reserved(). Undo that in an

Modified: subversion/branches/master-passphrase/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/diff-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/diff-cmd.c Fri May 10 14:58:47 2013
@@ -37,6 +37,7 @@
 #include "svn_types.h"
 #include "svn_cmdline.h"
 #include "svn_xml.h"
+#include "svn_hash.h"
 #include "cl.h"
 
 #include "svn_private_config.h"
@@ -179,6 +180,7 @@ svn_cl__diff(apr_getopt_t *os,
   const char *old_target, *new_target;
   apr_pool_t *iterpool;
   svn_boolean_t pegged_diff = FALSE;
+  svn_boolean_t ignore_content_type;
   svn_boolean_t show_copies_as_adds =
     opt_state->diff.patch_compatible || opt_state->diff.show_copies_as_adds;
   svn_boolean_t ignore_properties =
@@ -337,6 +339,21 @@ svn_cl__diff(apr_getopt_t *os,
 
     }
 
+  /* Should we ignore the content-type when deciding what to diff? */
+  if (opt_state->force)
+    {
+      ignore_content_type = TRUE;
+    }
+  else
+    {
+      SVN_ERR(svn_config_get_bool(svn_hash_gets(ctx->config,
+                                                SVN_CONFIG_CATEGORY_CONFIG),
+                                  &ignore_content_type,
+                                  SVN_CONFIG_SECTION_MISCELLANY,
+                                  SVN_CONFIG_OPTION_DIFF_IGNORE_CONTENT_TYPE,
+                                  FALSE));
+    }
+
   svn_opt_push_implicit_dot_target(targets, pool);
 
   iterpool = svn_pool_create(pool);
@@ -399,7 +416,7 @@ svn_cl__diff(apr_getopt_t *os,
                      opt_state->diff.no_diff_added,
                      opt_state->diff.no_diff_deleted,
                      show_copies_as_adds,
-                     opt_state->force,
+                     ignore_content_type,
                      ignore_properties,
                      opt_state->diff.properties_only,
                      opt_state->diff.use_git_diff_format,
@@ -450,7 +467,7 @@ svn_cl__diff(apr_getopt_t *os,
                      opt_state->diff.no_diff_added,
                      opt_state->diff.no_diff_deleted,
                      show_copies_as_adds,
-                     opt_state->force,
+                     ignore_content_type,
                      ignore_properties,
                      opt_state->diff.properties_only,
                      opt_state->diff.use_git_diff_format,

Modified: subversion/branches/master-passphrase/subversion/svn/file-merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/file-merge.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/file-merge.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/file-merge.c Fri May 10 14:58:47 2013
@@ -57,7 +57,7 @@ struct file_merge_baton {
   apr_file_t *original_file;
   apr_file_t *modified_file;
   apr_file_t *latest_file;
-  
+
   /* Counters to keep track of the current line in each file. */
   svn_linenum_t current_line_original;
   svn_linenum_t current_line_modified;
@@ -307,7 +307,7 @@ static int
 get_term_width(void)
 {
   char *columns_env;
-#ifdef TIOCGWINSZ	
+#ifdef TIOCGWINSZ
   int fd;
 
   fd = open("/dev/tty", O_RDONLY, 0);
@@ -367,12 +367,12 @@ prepare_line_for_display(const char *lin
 {
   svn_stringbuf_t *buf = svn_stringbuf_create(line, pool);
   size_t width;
-  int line_width = LINE_DISPLAY_WIDTH;
+  size_t line_width = LINE_DISPLAY_WIDTH;
   apr_pool_t *iterpool;
 
   /* Trim EOL. */
   if (buf->len >= 2 &&
-      buf->data[buf->len - 2] == '\r' && 
+      buf->data[buf->len - 2] == '\r' &&
       buf->data[buf->len - 1] == '\n')
     svn_stringbuf_chop(buf, 2);
   else if (buf->len >= 1 &&
@@ -591,7 +591,7 @@ merge_chunks(apr_array_header_t **merged
                                                   : chunk2->nelts;
   *abort_merge = FALSE;
 
-  /* 
+  /*
    * Prepare the selection prompt.
    */
 
@@ -645,7 +645,7 @@ merge_chunks(apr_array_header_t **merged
         }
       else
         line2 = prepare_line_for_display("", iterpool);
-        
+
       prompt_line = apr_psprintf(iterpool, "%s|%s\n", line1, line2);
 
       svn_stringbuf_appendcstr(prompt, prompt_line);
@@ -910,7 +910,7 @@ svn_cl__merge_file(const char *base_path
                 svn_dirent_local_style(svn_dirent_skip_ancestor(path_prefix,
                                                                 wc_path),
                                        scratch_pool)));
-                
+
       return SVN_NO_ERROR;
     }
 
@@ -950,6 +950,6 @@ svn_cl__merge_file(const char *base_path
               svn_dirent_local_style(svn_dirent_skip_ancestor(path_prefix,
                                                               wc_path),
                                      scratch_pool)));
-                
+
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/master-passphrase/subversion/svn/help-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/help-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/help-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/help-cmd.c Fri May 10 14:58:47 2013
@@ -27,6 +27,7 @@
 
 /*** Includes. ***/
 
+#include "svn_hash.h"
 #include "svn_string.h"
 #include "svn_config.h"
 #include "svn_error.h"
@@ -92,9 +93,8 @@ svn_cl__help(apr_getopt_t *os,
 
       if (cmd_baton->ctx->config)
         {
-          cfg = apr_hash_get(cmd_baton->ctx->config,
-                             SVN_CONFIG_CATEGORY_CONFIG,
-                             APR_HASH_KEY_STRING);
+          cfg = svn_hash_gets(cmd_baton->ctx->config,
+                              SVN_CONFIG_CATEGORY_CONFIG);
           if (cfg)
             {
               SVN_ERR(svn_config_get_bool(cfg, &store_auth_creds,
@@ -106,9 +106,8 @@ svn_cl__help(apr_getopt_t *os,
                                           SVN_CONFIG_OPTION_STORE_PASSWORDS,
                                           store_passwords));
             }
-          cfg = apr_hash_get(cmd_baton->ctx->config,
-                             SVN_CONFIG_CATEGORY_SERVERS,
-                             APR_HASH_KEY_STRING);
+          cfg = svn_hash_gets(cmd_baton->ctx->config,
+                              SVN_CONFIG_CATEGORY_SERVERS);
           if (cfg)
             {
               const char *value;

Modified: subversion/branches/master-passphrase/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/info-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/info-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/info-cmd.c Fri May 10 14:58:47 2013
@@ -438,6 +438,7 @@ print_info(void *baton,
 
       if (info->wc_info->conflicts)
         {
+          svn_boolean_t printed_prop_conflict_file = FALSE;
           int i;
 
           for (i = 0; i < info->wc_info->conflicts->nelts; i++)
@@ -473,10 +474,12 @@ print_info(void *baton,
                   break;
 
                   case svn_wc_conflict_kind_property:
-                    SVN_ERR(svn_cmdline_printf(pool,
-                              _("Conflict Properties File: %s\n"),
-                              svn_dirent_local_style(conflict->their_abspath,
-                                                     pool)));
+                    if (! printed_prop_conflict_file)
+                      SVN_ERR(svn_cmdline_printf(pool,
+                                _("Conflict Properties File: %s\n"),
+                                svn_dirent_local_style(conflict->their_abspath,
+                                                       pool)));
+                    printed_prop_conflict_file = TRUE;
                   break;
 
                   case svn_wc_conflict_kind_tree:

Modified: subversion/branches/master-passphrase/subversion/svn/list-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/list-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/list-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/list-cmd.c Fri May 10 14:58:47 2013
@@ -42,7 +42,7 @@
 struct print_baton {
   svn_boolean_t verbose;
   svn_client_ctx_t *ctx;
-  
+
   /* To keep track of last seen external information. */
   const char *last_external_parent_url;
   const char *last_external_target;
@@ -89,17 +89,17 @@ print_dirent(void *baton,
     }
   else
     entryname = path;
-  
+
   if (external_parent_url && external_target)
     {
-      if ((pb->last_external_parent_url == NULL 
-           && pb->last_external_target == NULL) 
+      if ((pb->last_external_parent_url == NULL
+           && pb->last_external_target == NULL)
           || (strcmp(pb->last_external_parent_url, external_parent_url) != 0
               || strcmp(pb->last_external_target, external_target) != 0))
         {
           SVN_ERR(svn_cmdline_printf(scratch_pool,
                                      _("Listing external '%s'"
-                                       " defined on '%s':\n"), 
+                                       " defined on '%s':\n"),
                                      external_target,
                                      external_parent_url));
 
@@ -140,7 +140,7 @@ print_dirent(void *baton,
       /* we need it in UTF-8. */
       SVN_ERR(svn_utf_cstring_to_utf8(&utf8_timestr, timestr, scratch_pool));
 
-      sizestr = apr_psprintf(scratch_pool, "%" SVN_FILESIZE_T_FMT, 
+      sizestr = apr_psprintf(scratch_pool, "%" SVN_FILESIZE_T_FMT,
                              dirent->size);
 
       return svn_cmdline_printf
@@ -177,7 +177,7 @@ print_dirent_xml(void *baton,
   struct print_baton *pb = baton;
   const char *entryname;
   svn_stringbuf_t *sb = svn_stringbuf_create_empty(scratch_pool);
-  
+
   SVN_ERR_ASSERT((external_parent_url == NULL && external_target == NULL) ||
                  (external_parent_url && external_target));
 
@@ -194,10 +194,10 @@ print_dirent_xml(void *baton,
 
   if (pb->ctx->cancel_func)
     SVN_ERR(pb->ctx->cancel_func(pb->ctx->cancel_baton));
-  
+
   if (external_parent_url && external_target)
     {
-      if ((pb->last_external_parent_url == NULL 
+      if ((pb->last_external_parent_url == NULL
            && pb->last_external_target == NULL)
           || (strcmp(pb->last_external_parent_url, external_parent_url) != 0
               || strcmp(pb->last_external_target, external_target) != 0))
@@ -339,8 +339,8 @@ svn_cl__list(apr_getopt_t *os,
       const char *target = APR_ARRAY_IDX(targets, i, const char *);
       const char *truepath;
       svn_opt_revision_t peg_revision;
-      
-      /* Initialize the following variables for 
+
+      /* Initialize the following variables for
          every list target. */
       pb.last_external_parent_url = NULL;
       pb.last_external_target = NULL;
@@ -390,10 +390,10 @@ svn_cl__list(apr_getopt_t *os,
       if (opt_state->xml)
         {
           svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
-          
+
           if (pb.in_external)
             {
-              /* close the final external item's tag */ 
+              /* close the final external item's tag */
               svn_xml_make_close_tag(&sb, pool, "external");
               pb.in_external = FALSE;
             }
@@ -404,7 +404,7 @@ svn_cl__list(apr_getopt_t *os,
     }
 
   svn_pool_destroy(subpool);
-  
+
   if (opt_state->include_externals && nwb.had_externals_error)
     {
       externals_err = svn_error_create(SVN_ERR_CL_ERROR_PROCESSING_EXTERNALS,

Modified: subversion/branches/master-passphrase/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/log-cmd.c?rev=1481041&r1=1481040&r2=1481041&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/log-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/log-cmd.c Fri May 10 14:58:47 2013
@@ -159,7 +159,7 @@ match_search_pattern(const char *search_
 {
   /* Match any substring containing the pattern, like UNIX 'grep' does. */
   const char *pattern = apr_psprintf(pool, "*%s*", search_pattern);
-  int flags = APR_FNM_CASE_BLIND;
+  int flags = 0;
 
   /* Does the author match the search pattern? */
   if (author && apr_fnmatch(pattern, author, flags) == APR_SUCCESS)
@@ -229,7 +229,7 @@ match_search_patterns(apr_array_header_t
           const char *pattern;
 
           svn_pool_clear(iterpool);
-          
+
           pattern = APR_ARRAY_IDX(pattern_group, j, const char *);
           match = match_search_pattern(pattern, author, date, message,
                                        changed_paths, iterpool);