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 2012/10/30 21:03:39 UTC

svn commit: r1403849 [16/19] - in /subversion/branches/master-passphrase: ./ build/ build/ac-macros/ build/hudson/ contrib/server-side/fsfsfixer/ notes/ notes/api-errata/1.8/ notes/directory-index/ notes/obliterate/ notes/tree-conflicts/ subversion/bin...

Modified: subversion/branches/master-passphrase/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/main.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/main.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/main.c Tue Oct 30 20:03:28 2012
@@ -129,6 +129,7 @@ typedef enum svn_cl__longopt_t {
   opt_diff,
   opt_allow_mixed_revisions,
   opt_include_externals,
+  opt_show_inherited_props,
   opt_search,
   opt_search_and,
 } svn_cl__longopt_t;
@@ -349,7 +350,7 @@ const apr_getopt_option_t svn_cl__option
                        )},
   /* end of diff options */
   {"allow-mixed-revisions", opt_allow_mixed_revisions, 0,
-                       N_("Allow merge into mixed-revision working copy.\n"
+                       N_("Allow operation on mixed-revision working copy.\n"
                        "                             "
                        "Use of this option is not recommended!\n"
                        "                             "
@@ -360,6 +361,8 @@ const apr_getopt_option_t svn_cl__option
                        "recursion. This does not include externals with a\n"
                        "                             "
                        "fixed revision. (See the svn:externals property)")},
+  {"show-inherited-props", opt_show_inherited_props, 0,
+                       N_("retrieve target's inherited properties")},
   {"search", opt_search, 1,
                        N_("use ARG as search pattern (glob syntax)")},
   {"search-and", opt_search_and, 1,
@@ -485,19 +488,16 @@ const svn_opt_subcommand_desc2_t svn_cl_
      opt_changelist, opt_keep_changelists, opt_include_externals} },
 
   { "copy", svn_cl__copy, {"cp"}, N_
-    ("Duplicate something in working copy or repository, remembering\n"
-     "history.\n"
+    ("Copy files and directories in a working copy or repository.\n"
      "usage: copy SRC[@REV]... DST\n"
      "\n"
-     "  When copying multiple sources, they will be added as children of DST,\n"
-     "  which must be a directory.\n"
-     "\n"
      "  SRC and DST can each be either a working copy (WC) path or URL:\n"
      "    WC  -> WC:   copy and schedule for addition (with history)\n"
      "    WC  -> URL:  immediately commit a copy of WC to URL\n"
      "    URL -> WC:   check out URL into WC, schedule for addition\n"
      "    URL -> URL:  complete server-side copy;  used to branch and tag\n"
-     "  All the SRCs must be of the same type.\n"
+     "  All the SRCs must be of the same type. When copying multiple sources,\n"
+     "  they will be added as children of DST, which must be a directory.\n"
      "\n"
      "  WARNING: For compatibility with previous versions of Subversion,\n"
      "  copies performed using two working copy paths (WC -> WC) will not\n"
@@ -1037,22 +1037,30 @@ const svn_opt_subcommand_desc2_t svn_cl_
   { "mergeinfo", svn_cl__mergeinfo, {0}, N_
     ("Display merge-related information.\n"
      "usage: 1. mergeinfo SOURCE[@REV] [TARGET[@REV]]\n"
-     "       2. mergeinfo --show-revs=merged SOURCE[@REV] [TARGET[@REV]]\n"
-     "       3. mergeinfo --show-revs=eligible SOURCE[@REV] [TARGET[@REV]]\n"
+     "       2. mergeinfo --show-revs=WHICH SOURCE[@REV] [TARGET[@REV]]\n"
      "\n"
-     "  1. Display the following information about merges between SOURCE and\n"
-     "     TARGET:\n"
-     "       the youngest common ancestor;\n"
-     "       the latest full merge in either direction, and thus the\n"
-     "         base that will be used for the next full merge.\n"
-     "  2. Print the revision numbers on SOURCE that have been merged to TARGET.\n"
-     "  3. Print the revision numbers on SOURCE that have NOT been merged to TARGET.\n"
-     "\n"
-     "  The default TARGET is the current working directory ('.').\n"
-     "  If --revision (-r) is provided, filter the displayed information to\n"
-     "  show only that which is associated with the revisions within the\n"
-     "  specified range.  Revision numbers, dates, and the 'HEAD' keyword are\n"
-     "  valid range values.\n"
+     "  1. Summarize the history of merging between SOURCE and TARGET. The graph\n"
+     "     shows, from left to right:\n"
+     "       the youngest common ancestor of the branches;\n"
+     "       the latest full merge in either direction, and thus the common base\n"
+     "         that will be used for the next automatic merge;\n"
+     "       the repository path and revision number of the tip of each branch.\n"
+     "\n"
+     "  2. Print the revision numbers on SOURCE that have been merged to TARGET\n"
+     "     (with --show-revs=merged), or that have not been merged to TARGET\n"
+     "     (with --show-revs=eligible). Print only revisions in which there was\n"
+     "     at least one change in SOURCE.\n"
+     "\n"
+     "     If --revision (-r) is provided, filter the displayed information to\n"
+     "     show only that which is associated with the revisions within the\n"
+     "     specified range.  Revision numbers, dates, and the 'HEAD' keyword are\n"
+     "     valid range values.\n"
+     "\n"
+     "  SOURCE and TARGET are the source and target branch URLs, respectively.\n"
+     "  (If a WC path is given, the corresponding base URL is used.) The default\n"
+     "  TARGET is the current working directory ('.'). REV specifies the revision\n"
+     "  to be considered the tip of the branch; the default for SOURCE is HEAD,\n"
+     "  and the default for TARGET is HEAD for a URL or BASE for a WC path.\n"
      "\n"
      "  The depth can be 'empty' or 'infinity'; the default is 'empty'.\n"),
     {'r', 'R', opt_depth, opt_show_revs} },
@@ -1075,20 +1083,26 @@ const svn_opt_subcommand_desc2_t svn_cl_
     {'q', opt_parents, SVN_CL__LOG_MSG_OPTIONS} },
 
   { "move", svn_cl__move, {"mv", "rename", "ren"}, N_
-    ("Move and/or rename something in working copy or repository.\n"
+    ("Move (rename) an item in a working copy or repository.\n"
      "usage: move SRC... DST\n"
      "\n"
-     "  When moving multiple sources, they will be added as children of DST,\n"
-     "  which must be a directory.\n"
-     "\n"
-     "  Note:  this subcommand is equivalent to a 'copy' and 'delete'.\n"
-     "  Note:  the --revision option has no use and is deprecated.\n"
-     "\n"
      "  SRC and DST can both be working copy (WC) paths or URLs:\n"
-     "    WC  -> WC:   move and schedule for addition (with history)\n"
-     "    URL -> URL:  complete server-side rename.\n"
-     "  All the SRCs must be of the same type.\n"),
-    {'r', 'q', opt_force, opt_parents, SVN_CL__LOG_MSG_OPTIONS} },
+     "    WC  -> WC:  move an item in a working copy, as a local change to\n"
+     "                be committed later (with or without further changes)\n"
+     "    URL -> URL: move an item in the repository directly, immediately\n"
+     "                creating a new revision in the repository\n"
+     "  All the SRCs must be of the same type. When moving multiple sources,\n"
+     "  they will be added as children of DST, which must be a directory.\n"
+     "\n"
+     "  SRC and DST of WC -> WC moves must be committed in the same revision.\n"
+     "  Furthermore, WC -> WC moves will refuse to move a mixed-revision subtree.\n"
+     "  To avoid unnecessary conflicts, it is recommended to run 'svn update'\n"
+     "  to update the subtree to a single revision before moving it.\n"
+     "  The --allow-mixed-revisions option is provided for backward compatibility.\n"
+     "\n"
+     "  The --revision option has no use and is deprecated.\n"),
+    {'r', 'q', opt_force, opt_parents, opt_allow_mixed_revisions, 
+     SVN_CL__LOG_MSG_OPTIONS} },
 
   { "patch", svn_cl__patch, {0}, N_
     ("Apply a patch to a working copy.\n"
@@ -1179,7 +1193,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  use the --strict option to disable this (useful when redirecting a binary\n"
      "  property value to a file, for example).\n"),
     {'v', 'R', opt_depth, 'r', opt_revprop, opt_strict, opt_xml,
-     opt_changelist },
+     opt_changelist, opt_show_inherited_props },
     {{'v', N_("print path, name and value on separate lines")},
      {opt_strict, N_("don't print an extra newline")}} },
 
@@ -1195,7 +1209,8 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "\n"
      "  With --verbose, the property values are printed as well, like 'svn propget\n"
      "  --verbose'.  With --quiet, the paths are not printed.\n"),
-    {'v', 'R', opt_depth, 'r', 'q', opt_revprop, opt_xml, opt_changelist },
+    {'v', 'R', opt_depth, 'r', 'q', opt_revprop, opt_xml, opt_changelist,
+     opt_show_inherited_props },
     {{'v', N_("print path, name and value on separate lines")},
      {'q', N_("don't print the path")}} },
 
@@ -1615,7 +1630,8 @@ add_search_pattern_to_latest_group(svn_c
 
 /*** Main. ***/
 
-/* Report and clear the error ERR, and return EXIT_FAILURE. */
+/* Report and clear the error ERR, and return EXIT_FAILURE. Suppress the
+ * error message if it is SVN_ERR_IO_PIPE_WRITE_ERROR. */
 #define EXIT_ERROR(err)                                                 \
   svn_cmdline_handle_exit_error(err, NULL, "svn: ")
 
@@ -1648,6 +1664,8 @@ sub_main(int argc, const char *argv[], a
   svn_boolean_t interactive_conflicts = FALSE;
   svn_boolean_t use_notifier = TRUE;
   apr_hash_t *changelists;
+  const char *sqlite_exclusive;
+  apr_hash_t *cfg_hash;
 
   received_opts = apr_array_make(pool, SVN_OPT_MAX_OPTIONS, sizeof(int));
 
@@ -2158,6 +2176,9 @@ sub_main(int argc, const char *argv[], a
       case opt_include_externals:
         opt_state.include_externals = TRUE;
         break;
+      case opt_show_inherited_props:
+        opt_state.show_inherited_props = TRUE;
+        break;
       case opt_properties_only:
         opt_state.diff.properties_only = TRUE;
         break;
@@ -2366,14 +2387,111 @@ sub_main(int argc, const char *argv[], a
   opt_state.end_revision = APR_ARRAY_IDX(opt_state.revision_ranges, 0,
                                          svn_opt_revision_range_t *)->end;
 
+  err = svn_config_get_config(&cfg_hash, opt_state.config_dir, pool);
+  if (err)
+    {
+      /* Fallback to default config if the config directory isn't readable
+         or is not a directory. */
+      if (APR_STATUS_IS_EACCES(err->apr_err)
+          || SVN__APR_STATUS_IS_ENOTDIR(err->apr_err))
+        {
+          svn_handle_warning2(stderr, err, "svn: ");
+          svn_error_clear(err);
+          cfg_hash = NULL;
+        }
+      else
+        return EXIT_ERROR(err);
+    }
+
   /* Create a client context object. */
   command_baton.opt_state = &opt_state;
-  SVN_INT_ERR(svn_client_create_context(&ctx, pool));
+  SVN_INT_ERR(svn_client_create_context2(&ctx, cfg_hash, pool));
   command_baton.ctx = ctx;
 
+  /* Relocation is infinite-depth only. */
+  if (opt_state.relocate)
+    {
+      if (opt_state.depth != svn_depth_unknown)
+        {
+          err = svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
+                                 _("--relocate and --depth are mutually "
+                                   "exclusive"));
+          return EXIT_ERROR(err);
+        }
+      if (! descend)
+        {
+          err = svn_error_create(
+                    SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
+                    _("--relocate and --non-recursive (-N) are mutually "
+                      "exclusive"));
+          return EXIT_ERROR(err);
+        }
+    }
+
+  /* Only a few commands can accept a revision range; the rest can take at
+     most one revision number. */
+  if (subcommand->cmd_func != svn_cl__blame
+      && subcommand->cmd_func != svn_cl__diff
+      && subcommand->cmd_func != svn_cl__log
+      && subcommand->cmd_func != svn_cl__mergeinfo
+      && subcommand->cmd_func != svn_cl__merge)
+    {
+      if (opt_state.end_revision.kind != svn_opt_revision_unspecified)
+        {
+          err = svn_error_create(SVN_ERR_CLIENT_REVISION_RANGE, NULL, NULL);
+          return EXIT_ERROR(err);
+        }
+    }
+
+  /* -N has a different meaning depending on the command */
+  if (descend == FALSE)
+    {
+      if (subcommand->cmd_func == svn_cl__status)
+        {
+          opt_state.depth = svn_depth_immediates;
+        }
+      else if (subcommand->cmd_func == svn_cl__revert
+               || subcommand->cmd_func == svn_cl__add
+               || subcommand->cmd_func == svn_cl__commit)
+        {
+          /* In pre-1.5 Subversion, some commands treated -N like
+             --depth=empty, so force that mapping here.  Anyway, with
+             revert it makes sense to be especially conservative,
+             since revert can lose data. */
+          opt_state.depth = svn_depth_empty;
+        }
+      else
+        {
+          opt_state.depth = svn_depth_files;
+        }
+    }
+
+  cfg_config = apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
+                            APR_HASH_KEY_STRING);
+
+  /* Update the options in the config */
+  if (opt_state.config_options)
+    {
+      svn_error_clear(
+          svn_cmdline__apply_config_options(ctx->config,
+                                            opt_state.config_options,
+                                            "svn: ", "--config-option"));
+    }
+
+  svn_config_get(cfg_config, &sqlite_exclusive,
+                 SVN_CONFIG_SECTION_WORKING_COPY,
+                 SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE,
+                 NULL);
+  if (!sqlite_exclusive)
+    svn_config_set(cfg_config,
+                   SVN_CONFIG_SECTION_WORKING_COPY,
+                   SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE,
+                   "true");
+
   /* If we're running a command that could result in a commit, verify
      that any log message we were given on the command line makes
-     sense (unless we've also been instructed not to care). */
+     sense (unless we've also been instructed not to care).  This may
+     access the working copy so do it after setting the locking mode. */
   if ((! opt_state.force_log)
       && (subcommand->cmd_func == svn_cl__commit
           || subcommand->cmd_func == svn_cl__copy
@@ -2448,92 +2566,6 @@ sub_main(int argc, const char *argv[], a
         }
     }
 
-  /* Relocation is infinite-depth only. */
-  if (opt_state.relocate)
-    {
-      if (opt_state.depth != svn_depth_unknown)
-        {
-          err = svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
-                                 _("--relocate and --depth are mutually "
-                                   "exclusive"));
-          return EXIT_ERROR(err);
-        }
-      if (! descend)
-        {
-          err = svn_error_create(
-                    SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
-                    _("--relocate and --non-recursive (-N) are mutually "
-                      "exclusive"));
-          return EXIT_ERROR(err);
-        }
-    }
-
-  /* Only a few commands can accept a revision range; the rest can take at
-     most one revision number. */
-  if (subcommand->cmd_func != svn_cl__blame
-      && subcommand->cmd_func != svn_cl__diff
-      && subcommand->cmd_func != svn_cl__log
-      && subcommand->cmd_func != svn_cl__mergeinfo
-      && subcommand->cmd_func != svn_cl__merge)
-    {
-      if (opt_state.end_revision.kind != svn_opt_revision_unspecified)
-        {
-          err = svn_error_create(SVN_ERR_CLIENT_REVISION_RANGE, NULL, NULL);
-          return EXIT_ERROR(err);
-        }
-    }
-
-  /* -N has a different meaning depending on the command */
-  if (descend == FALSE)
-    {
-      if (subcommand->cmd_func == svn_cl__status)
-        {
-          opt_state.depth = svn_depth_immediates;
-        }
-      else if (subcommand->cmd_func == svn_cl__revert
-               || subcommand->cmd_func == svn_cl__add
-               || subcommand->cmd_func == svn_cl__commit)
-        {
-          /* In pre-1.5 Subversion, some commands treated -N like
-             --depth=empty, so force that mapping here.  Anyway, with
-             revert it makes sense to be especially conservative,
-             since revert can lose data. */
-          opt_state.depth = svn_depth_empty;
-        }
-      else
-        {
-          opt_state.depth = svn_depth_files;
-        }
-    }
-
-  err = svn_config_get_config(&(ctx->config),
-                              opt_state.config_dir, pool);
-  if (err)
-    {
-      /* Fallback to default config if the config directory isn't readable
-         or is not a directory. */
-      if (APR_STATUS_IS_EACCES(err->apr_err)
-          || SVN__APR_STATUS_IS_ENOTDIR(err->apr_err))
-        {
-          svn_handle_warning2(stderr, err, "svn: ");
-          svn_error_clear(err);
-        }
-      else
-        return EXIT_ERROR(err);
-    }
-
-  cfg_config = apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
-                            APR_HASH_KEY_STRING);
-
-  /* Update the options in the config */
-  if (opt_state.config_options)
-    {
-      svn_error_clear(
-          svn_cmdline__apply_config_options(ctx->config,
-                                            opt_state.config_options,
-                                            "svn: ", "--config-option"));
-    }
-
   /* XXX: Only diff_cmd for now, overlay rest later and stop passing
      opt_state altogether? */
   if (opt_state.diff.diff_cmd)
@@ -2650,60 +2682,53 @@ sub_main(int argc, const char *argv[], a
 
   ctx->auth_baton = ab;
 
-  /* Set up conflict resolution callback. */
-  SVN_INT_ERR(svn_config_get_bool(cfg_config, &interactive_conflicts,
-                                  SVN_CONFIG_SECTION_MISCELLANY,
-                                  SVN_CONFIG_OPTION_INTERACTIVE_CONFLICTS,
-                                  TRUE));  /* ### interactivity on by default.
-                                                  we can change this. */
-
-  /* The new svn behavior is to postpone everything until after the operation
-     completed */
+  /* Install the default conflict handler which postpones all conflicts
+   * and remembers the list of conflicted paths to be resolved later.
+   * This is overridden only within the 'resolve' subcommand. */
   ctx->conflict_func = NULL;
   ctx->conflict_baton = NULL;
-  ctx->conflict_func2 = NULL;
-  ctx->conflict_baton2 = NULL;
+  ctx->conflict_func2 = svn_cl__conflict_func_postpone;
+  ctx->conflict_baton2 = svn_cl__get_conflict_func_postpone_baton(pool);
 
-  if ((opt_state.accept_which == svn_cl__accept_unspecified
-       && (!interactive_conflicts || opt_state.non_interactive))
-      || opt_state.accept_which == svn_cl__accept_postpone)
-    {
-      /* If no --accept option at all and we're non-interactive, we're
-         leaving the conflicts behind, so don't need the callback.  Same if
-         the user said to postpone. */
-      opt_state.conflict_func = NULL;
-      opt_state.conflict_baton = NULL;
-    }
-  else
+  if (opt_state.non_interactive)
     {
-      svn_cl__conflict_baton_t * conflict_baton2;
-      svn_cmdline_prompt_baton_t *pb = apr_palloc(pool, sizeof(*pb));
-      pb->cancel_func = ctx->cancel_func;
-      pb->cancel_baton = ctx->cancel_baton;
-
-      if (opt_state.non_interactive)
-        {
-          if (opt_state.accept_which == svn_cl__accept_edit)
-            return EXIT_ERROR
-              (svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                 _("--accept=%s incompatible with"
-                                   " --non-interactive"), SVN_CL__ACCEPT_EDIT));
-          if (opt_state.accept_which == svn_cl__accept_launch)
-            return EXIT_ERROR
-              (svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                 _("--accept=%s incompatible with"
-                                   " --non-interactive"),
-                                 SVN_CL__ACCEPT_LAUNCH));
-        }
+      if (opt_state.accept_which == svn_cl__accept_edit)
+        return EXIT_ERROR(
+                 svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                   _("--accept=%s incompatible with"
+                                     " --non-interactive"),
+                                   SVN_CL__ACCEPT_EDIT));
+
+      if (opt_state.accept_which == svn_cl__accept_launch)
+        return EXIT_ERROR(
+                 svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                   _("--accept=%s incompatible with"
+                                     " --non-interactive"),
+                                   SVN_CL__ACCEPT_LAUNCH));
+
+      /* The default action when we're non-interactive is to postpone
+       * conflict resolution. */
+      if (opt_state.accept_which == svn_cl__accept_unspecified)
+        opt_state.accept_which = svn_cl__accept_postpone;
+    }
+
+  /* Check whether interactive conflict resolution is disabled by
+   * the configuration file. If no --accept option was specified
+   * we postpone all conflicts in this case. */
+  SVN_INT_ERR(svn_config_get_bool(cfg_config, &interactive_conflicts,
+                                  SVN_CONFIG_SECTION_MISCELLANY,
+                                  SVN_CONFIG_OPTION_INTERACTIVE_CONFLICTS,
+                                  TRUE));
+  if (!interactive_conflicts)
+    {
+      /* Make 'svn resolve' non-interactive. */
+      if (subcommand->cmd_func == svn_cl__resolve)
+        opt_state.non_interactive = TRUE;
 
-      opt_state.conflict_func = svn_cl__conflict_handler;
-      SVN_INT_ERR(svn_cl__conflict_baton_make(&conflict_baton2,
-                                              opt_state.accept_which,
-                                              ctx->config,
-                                              opt_state.editor_cmd,
-                                              pb,
-                                              pool));
-      opt_state.conflict_baton = conflict_baton2;
+      /* We're not resolving conflicts interactively. If no --accept option
+       * was provided the default behaviour is to postpone all conflicts. */
+      if (opt_state.accept_which == svn_cl__accept_unspecified)
+        opt_state.accept_which = svn_cl__accept_postpone;
     }
 
   /* And now we finally run the subcommand. */

Modified: subversion/branches/master-passphrase/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/merge-cmd.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/merge-cmd.c Tue Oct 30 20:03:28 2012
@@ -104,9 +104,9 @@ ensure_wc_path_has_repo_revision(const c
   return SVN_NO_ERROR;
 }
 
-/* Symmetric, merge-tracking merge, used for sync or reintegrate purposes. */
+/* Automatic, merge-tracking merge, used for sync or reintegrate purposes. */
 static svn_error_t *
-symmetric_merge(const char *source_path_or_url,
+automatic_merge(const char *source_path_or_url,
                 const svn_opt_revision_t *source_revision,
                 const char *target_wcpath,
                 svn_depth_t depth,
@@ -120,16 +120,16 @@ symmetric_merge(const char *source_path_
                 svn_client_ctx_t *ctx,
                 apr_pool_t *scratch_pool)
 {
-  svn_client__symmetric_merge_t *merge;
+  svn_client_automatic_merge_t *merge;
 
   /* Find the 3-way merges needed (and check suitability of the WC). */
-  SVN_ERR(svn_client__find_symmetric_merge(&merge,
-                                           source_path_or_url, source_revision,
-                                           target_wcpath, allow_mixed_rev,
-                                           allow_local_mods, allow_switched_subtrees,
-                                           ctx, scratch_pool, scratch_pool));
+  SVN_ERR(svn_client_find_automatic_merge(&merge,
+                                          source_path_or_url, source_revision,
+                                          target_wcpath, allow_mixed_rev,
+                                          allow_local_mods, allow_switched_subtrees,
+                                          ctx, scratch_pool, scratch_pool));
 
-  if (svn_client__symmetric_merge_is_reintegrate_like(merge))
+  if (svn_client_automatic_merge_is_reintegrate_like(merge))
     {
       if (record_only)
         return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
@@ -157,10 +157,10 @@ symmetric_merge(const char *source_path_
     }
 
   /* Perform the 3-way merges */
-  SVN_ERR(svn_client__do_symmetric_merge(merge, target_wcpath, depth,
-                                         force, record_only,
-                                         dry_run, merge_options,
-                                         ctx, scratch_pool));
+  SVN_ERR(svn_client_do_automatic_merge(merge, target_wcpath, depth,
+                                        force, record_only,
+                                        dry_run, merge_options,
+                                        ctx, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -428,7 +428,7 @@ svn_cl__merge(apr_getopt_t *os,
   /* Postpone conflict resolution during the merge operation.
    * If any conflicts occur we'll run the conflict resolver later. */
 
-  /* Do a symmetric merge if just one source and no revisions. */
+  /* Do an automatic merge if just one source and no revisions. */
   if ((! two_sources_specified)
       && (! opt_state->reintegrate)
       && (! opt_state->ignore_ancestry)
@@ -440,7 +440,7 @@ svn_cl__merge(apr_getopt_t *os,
                   ctx, pool),
                 _("Source and target must be different but related branches"));
 
-      merge_err = symmetric_merge(sourcepath1, &peg_revision1, targetpath,
+      merge_err = automatic_merge(sourcepath1, &peg_revision1, targetpath,
                                   opt_state->depth,
                                   opt_state->force,
                                   opt_state->record_only,
@@ -521,15 +521,12 @@ svn_cl__merge(apr_getopt_t *os,
   if (! opt_state->quiet)
     err = svn_cl__print_conflict_stats(ctx->notify_baton2, pool);
 
-  if (!err
-      && opt_state->conflict_func
-      && svn_cl__notifier_check_conflicts(ctx->notify_baton2))
-    {
-      err = svn_cl__resolve_conflicts(
-              svn_cl__notifier_get_conflicted_paths(ctx->notify_baton2, pool),
-              opt_state->depth, opt_state, ctx, pool);
-    }
-
+  if (!err)
+    err = svn_cl__resolve_postponed_conflicts(ctx->conflict_baton2,
+                                              opt_state->depth,
+                                              opt_state->accept_which,
+                                              opt_state->editor_cmd,
+                                              ctx, pool);
   if (merge_err)
     {
       if (merge_err->apr_err ==

Modified: subversion/branches/master-passphrase/subversion/svn/mergeinfo-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/mergeinfo-cmd.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/mergeinfo-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/mergeinfo-cmd.c Tue Oct 30 20:03:28 2012
@@ -80,37 +80,30 @@ mergeinfo_diagram(svn_client__pathrev_t 
   int col_width[COLS];
   int row, col;
 
-  /* The YCA (that is, the branching point) */
-  g[0][0] = apr_psprintf(pool, "  %-8ld", yca->rev);
-  g[1][0] =     "  |       ";
+  /* The YCA (that is, the branching point).  And an ellipsis, because we
+   * don't show information about earlier merges */
+  g[0][0] = apr_psprintf(pool, "  %-8ld  ", yca->rev);
+  g[1][0] =     "  |         ";
   if (strcmp(yca->url, right->url) == 0)
     {
-      g[2][0] = "----------";
-      g[3][0] = "   \\      ";
-      g[4][0] = "    \\     ";
-      g[5][0] = "     -----";
+      g[2][0] = "-------| |--";
+      g[3][0] = "   \\        ";
+      g[4][0] = "    \\       ";
+      g[5][0] = "     --| |--";
     }
   else if (strcmp(yca->url, target->url) == 0)
     {
-      g[2][0] = "     -----";
-      g[3][0] = "    /     ";
-      g[4][0] = "   /      ";
-      g[5][0] = "----------";
+      g[2][0] = "     --| |--";
+      g[3][0] = "    /       ";
+      g[4][0] = "   /        ";
+      g[5][0] = "-------| |--";
     }
   else
     {
-      g[2][0] = "     -----";
-      g[3][0] = "... /     ";
-      g[4][0] = "    \\     ";
-      g[5][0] = "     -----";
-    }
-
-  /* An ellipsis, because we don't show information about earlier merges */
-    {
-      g[2][1] = "| ... |---";
-      g[3][1] = "          ";
-      g[4][1] = "          ";
-      g[5][1] = "| ... |---";
+      g[2][0] = "     --| |--";
+      g[3][0] = "... /       ";
+      g[4][0] = "    \\       ";
+      g[5][0] = "     --| |--";
     }
 
   /* The last full merge */
@@ -149,8 +142,8 @@ mergeinfo_diagram(svn_client__pathrev_t 
       g[4][3] = "        ";
       g[5][3] = "-       ";
       g[6][3] = "|       ";
-      g[7][3] = target_is_wc ? apr_psprintf(pool, "%-8ld", target->rev)
-                             : "WC      ";
+      g[7][3] = target_is_wc ? "WC      "
+                             : apr_psprintf(pool, "%-8ld", target->rev);
     }
 
   /* Find the width of each column, so we know how to print blank cells */
@@ -166,9 +159,9 @@ mergeinfo_diagram(svn_client__pathrev_t 
 
   /* Column headings */
   SVN_ERR(svn_cmdline_fputs(
-            _("    youngest          last               repos.\n"
-              "    common            full     tip of    path of\n"
-              "    ancestor          merge    branch    branch\n"
+            _("    youngest  last               repos.\n"
+              "    common    full     tip of    path of\n"
+              "    ancestor  merge    branch    branch\n"
               "\n"),
             stdout, pool));
 
@@ -212,30 +205,30 @@ mergeinfo_summary(
                   svn_client_ctx_t *ctx,
                   apr_pool_t *pool)
 {
-  svn_client__symmetric_merge_t *the_merge;
+  svn_client_automatic_merge_t *the_merge;
   svn_client__pathrev_t *yca, *base, *right, *target;
   svn_boolean_t target_is_wc, reintegrate_like;
 
-  target_is_wc = svn_path_is_url(target_path_or_url)
+  target_is_wc = (! svn_path_is_url(target_path_or_url))
                  && (target_revision->kind == svn_opt_revision_unspecified
                      || target_revision->kind == svn_opt_revision_working);
   if (target_is_wc)
-    SVN_ERR(svn_client__find_symmetric_merge(
+    SVN_ERR(svn_client_find_automatic_merge(
               &the_merge,
               source_path_or_url, source_revision,
               target_path_or_url,
               TRUE, TRUE, TRUE,  /* allow_* */
               ctx, pool, pool));
   else
-    SVN_ERR(svn_client__find_symmetric_merge_no_wc(
+    SVN_ERR(svn_client_find_automatic_merge_no_wc(
               &the_merge,
               source_path_or_url, source_revision,
               target_path_or_url, target_revision,
               ctx, pool, pool));
 
-  SVN_ERR(svn_client__symmetric_merge_get_locations(
+  SVN_ERR(svn_client__automatic_merge_get_locations(
             &yca, &base, &right, &target, the_merge, pool));
-  reintegrate_like = svn_client__symmetric_merge_is_reintegrate_like(the_merge);
+  reintegrate_like = svn_client_automatic_merge_is_reintegrate_like(the_merge);
 
   SVN_ERR(mergeinfo_diagram(yca, base, right, target,
                             target_is_wc, reintegrate_like,
@@ -263,20 +256,15 @@ svn_cl__mergeinfo(apr_getopt_t *os,
                                                       opt_state->targets,
                                                       ctx, FALSE, pool));
 
-  /* We expect a single source URL followed by a single target --
-     nothing more, nothing less. */
+  /* Parse the arguments: SOURCE[@REV] optionally followed by TARGET[@REV]. */
   if (targets->nelts < 1)
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                             _("Not enough arguments given"));
   if (targets->nelts > 2)
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                             _("Too many arguments given"));
-
-  /* Parse the SOURCE-URL[@REV] argument. */
   SVN_ERR(svn_opt_parse_path(&src_peg_revision, &source,
                              APR_ARRAY_IDX(targets, 0, const char *), pool));
-
-  /* Parse the TARGET[@REV] argument (if provided). */
   if (targets->nelts == 2)
     {
       SVN_ERR(svn_opt_parse_path(&tgt_peg_revision, &target,
@@ -290,11 +278,15 @@ svn_cl__mergeinfo(apr_getopt_t *os,
     }
 
   /* If no peg-rev was attached to the source URL, assume HEAD. */
+  /* ### But what if SOURCE is a WC path not a URL -- shouldn't we then use
+   *     BASE (but not WORKING: that would be inconsistent with 'svn merge')? */
   if (src_peg_revision.kind == svn_opt_revision_unspecified)
     src_peg_revision.kind = svn_opt_revision_head;
 
   /* If no peg-rev was attached to a URL target, then assume HEAD; if
      no peg-rev was attached to a non-URL target, then assume BASE. */
+  /* ### But we would like to be able to examine a working copy with an
+         uncommitted merge in it, so change this to use WORKING not BASE? */
   if (tgt_peg_revision.kind == svn_opt_revision_unspecified)
     {
       if (svn_path_is_url(target))

Modified: subversion/branches/master-passphrase/subversion/svn/move-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/move-cmd.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/move-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/move-cmd.c Tue Oct 30 20:03:28 2012
@@ -84,8 +84,10 @@ svn_cl__move(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
-  err = svn_client_move6(targets, dst_path,
-                         TRUE, opt_state->parents, opt_state->revprop_table,
+  err = svn_client_move7(targets, dst_path,
+                         TRUE, opt_state->parents,
+                         opt_state->allow_mixed_rev,
+                         opt_state->revprop_table,
                          (opt_state->quiet ? NULL : svn_cl__print_commit_info),
                          NULL, ctx, pool);
 

Modified: subversion/branches/master-passphrase/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/notify.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/notify.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/notify.c Tue Oct 30 20:03:28 2012
@@ -58,7 +58,6 @@ struct notify_baton
   unsigned int prop_conflicts;
   unsigned int tree_conflicts;
   unsigned int skipped_paths;
-  apr_hash_t *conflicted_paths;
 
   /* The cwd, for use in decomposing absolute paths. */
   const char *path_prefix;
@@ -102,16 +101,6 @@ svn_cl__print_conflict_stats(void *notif
   return SVN_NO_ERROR;
 }
 
-/* Add a conflicted path to the list of conflicted paths stored
- * in the notify baton. */
-static void
-add_conflicted_path(struct notify_baton *nb, const char *path)
-{
-  apr_hash_set(nb->conflicted_paths,
-               apr_pstrdup(apr_hash_pool_get(nb->conflicted_paths), path),
-               APR_HASH_KEY_STRING, "");
-}
-
 /* This implements `svn_wc_notify_func2_t'.
  * NOTE: This function can't fail, so we just ignore any print errors. */
 static void
@@ -231,7 +220,6 @@ notify(void *baton, const svn_wc_notify_
       if (n->content_state == svn_wc_notify_state_conflicted)
         {
           nb->text_conflicts++;
-          add_conflicted_path(nb, n->path);
           if ((err = svn_cmdline_printf(pool, "C    %s\n", path_local)))
             goto print_error;
         }
@@ -247,7 +235,6 @@ notify(void *baton, const svn_wc_notify_
       if (n->content_state == svn_wc_notify_state_conflicted)
         {
           nb->text_conflicts++;
-          add_conflicted_path(nb, n->path);
           statchar_buf[0] = 'C';
         }
       else
@@ -256,7 +243,6 @@ notify(void *baton, const svn_wc_notify_
       if (n->prop_state == svn_wc_notify_state_conflicted)
         {
           nb->prop_conflicts++;
-          add_conflicted_path(nb, n->path);
           statchar_buf[1] = 'C';
         }
       else if (n->prop_state == svn_wc_notify_state_merged)
@@ -323,7 +309,6 @@ notify(void *baton, const svn_wc_notify_
         if (n->content_state == svn_wc_notify_state_conflicted)
           {
             nb->text_conflicts++;
-            add_conflicted_path(nb, n->path);
             statchar_buf[0] = 'C';
           }
         else if (n->kind == svn_node_file)
@@ -337,7 +322,6 @@ notify(void *baton, const svn_wc_notify_
         if (n->prop_state == svn_wc_notify_state_conflicted)
           {
             nb->prop_conflicts++;
-            add_conflicted_path(nb, n->path);
             statchar_buf[1] = 'C';
           }
         else if (n->prop_state == svn_wc_notify_state_changed)
@@ -531,7 +515,6 @@ notify(void *baton, const svn_wc_notify_
         if (n->content_state == svn_wc_notify_state_conflicted)
           {
             nb->text_conflicts++;
-            add_conflicted_path(nb, n->path);
             statchar_buf[0] = 'C';
           }
         else if (n->kind == svn_node_file)
@@ -545,7 +528,6 @@ notify(void *baton, const svn_wc_notify_
         if (n->prop_state == svn_wc_notify_state_conflicted)
           {
             nb->prop_conflicts++;
-            add_conflicted_path(nb, n->path);
             statchar_buf[1] = 'C';
           }
         else if (n->prop_state == svn_wc_notify_state_merged)
@@ -923,7 +905,6 @@ notify(void *baton, const svn_wc_notify_
 
     case svn_wc_notify_tree_conflict:
       nb->tree_conflicts++;
-      add_conflicted_path(nb, n->path);
       if ((err = svn_cmdline_printf(pool, "   C %s\n", path_local)))
         goto print_error;
       break;
@@ -1064,7 +1045,6 @@ svn_cl__get_notifier(svn_wc_notify_func2
   nb->prop_conflicts = 0;
   nb->tree_conflicts = 0;
   nb->skipped_paths = 0;
-  nb->conflicted_paths = apr_hash_make(pool);
   SVN_ERR(svn_dirent_get_absolute(&nb->path_prefix, "", pool));
 
   *notify_func_p = notify;
@@ -1112,36 +1092,3 @@ svn_cl__check_externals_failed_notify_wr
   if (nwb->wrapped_func)
     nwb->wrapped_func(nwb->wrapped_baton, n, pool);
 }
-
-svn_boolean_t
-svn_cl__notifier_check_conflicts(void *baton)
-{
-  struct notify_baton *nb = baton;
-
-  return (nb->text_conflicts || nb->prop_conflicts || nb->tree_conflicts);
-}
-
-apr_array_header_t *
-svn_cl__notifier_get_conflicted_paths(void *baton, apr_pool_t *result_pool)
-{
-  struct notify_baton *nb = baton;
-  apr_array_header_t *sorted_array;
-  apr_array_header_t *result_array;
-  int i;
-
-  sorted_array = svn_sort__hash(nb->conflicted_paths,
-                                svn_sort_compare_items_as_paths,
-                                apr_hash_pool_get(nb->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;
-}

Modified: subversion/branches/master-passphrase/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/propedit-cmd.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/propedit-cmd.c Tue Oct 30 20:03:28 2012
@@ -228,7 +228,7 @@ svn_cl__propedit(apr_getopt_t *os,
           peg_revision.kind = svn_opt_revision_unspecified;
 
           /* Fetch the current property. */
-          SVN_ERR(svn_client_propget4(&props, pname_utf8, abspath_or_url,
+          SVN_ERR(svn_client_propget5(&props, NULL, pname_utf8, abspath_or_url,
                                       &peg_revision,
                                       &(opt_state->start_revision),
                                       &base_rev, svn_depth_empty,

Modified: subversion/branches/master-passphrase/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/propget-cmd.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/propget-cmd.c Tue Oct 30 20:03:28 2012
@@ -70,11 +70,46 @@ stream_write(svn_stream_t *out,
 static svn_error_t *
 print_properties_xml(const char *pname,
                      apr_hash_t *props,
+                     apr_array_header_t *inherited_props,
                      apr_pool_t *pool)
 {
   apr_array_header_t *sorted_props;
   int i;
-  apr_pool_t *iterpool = svn_pool_create(pool);
+  apr_pool_t *iterpool = NULL;
+  svn_stringbuf_t *sb;
+
+  if (inherited_props && inherited_props->nelts)
+    {
+      iterpool = svn_pool_create(pool);
+
+      for (i = 0; i < inherited_props->nelts; i++)
+        {
+          const char *name_local;
+          svn_prop_inherited_item_t *iprop =
+           APR_ARRAY_IDX(inherited_props, i, svn_prop_inherited_item_t *);
+          svn_string_t *propval = svn__apr_hash_index_val(
+            apr_hash_first(pool, iprop->prop_hash));
+
+          sb = NULL;
+          svn_pool_clear(iterpool);
+
+          if (svn_path_is_url(iprop->path_or_url))
+            name_local = iprop->path_or_url;
+          else
+            name_local = svn_dirent_local_style(iprop->path_or_url, iterpool);
+
+          svn_xml_make_open_tag(&sb, iterpool, svn_xml_normal, "target",
+                            "path", name_local, NULL);
+
+          svn_cmdline__print_xml_prop(&sb, pname, propval, TRUE, iterpool);
+          svn_xml_make_close_tag(&sb, iterpool, "target");
+
+          SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
+        }
+    }
+
+  if (iterpool == NULL)
+    iterpool = svn_pool_create(iterpool);
 
   sorted_props = svn_sort__hash(props, svn_sort_compare_items_as_paths, pool);
   for (i = 0; i < sorted_props->nelts; i++)
@@ -82,38 +117,126 @@ print_properties_xml(const char *pname,
       svn_sort__item_t item = APR_ARRAY_IDX(sorted_props, i, svn_sort__item_t);
       const char *filename = item.key;
       svn_string_t *propval = item.value;
-      svn_stringbuf_t *sb = NULL;
 
+      sb = NULL;
       svn_pool_clear(iterpool);
 
       svn_xml_make_open_tag(&sb, iterpool, svn_xml_normal, "target",
                         "path", filename, NULL);
-      svn_cmdline__print_xml_prop(&sb, pname, propval, iterpool);
+      svn_cmdline__print_xml_prop(&sb, pname, propval, FALSE, iterpool);
       svn_xml_make_close_tag(&sb, iterpool, "target");
 
       SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
     }
 
-  svn_pool_destroy(iterpool);
+  if (iterpool)
+    svn_pool_destroy(iterpool);
+
+  return SVN_NO_ERROR;
+}
+
+/* Print the property PNAME_UTF with the value PROPVAL set on ABSPATH_OR_URL
+   to the stream OUT.
+
+   If INHERITED_PROPERTY is true then the property described is inherited,
+   otherwise it is explicit.
+
+   WC_PATH_PREFIX is the absolute path of the current working directory (and
+   is ignored if ABSPATH_OR_URL is a URL).
+
+   All other arguments are as per print_properties. */
+static svn_error_t *
+print_single_prop(svn_string_t *propval,
+                  const char *abspath_or_URL,
+                  const char *wc_path_prefix,
+                  svn_stream_t *out,
+                  const char *pname_utf8,
+                  svn_boolean_t print_filenames,
+                  svn_boolean_t omit_newline,
+                  svn_boolean_t like_proplist,
+                  svn_boolean_t inherited_property,
+                  apr_pool_t *scratch_pool)
+{
+  if (print_filenames)
+    {
+      const char *header;
+
+      /* Print the file name. */
+
+      if (! svn_path_is_url(abspath_or_URL))
+        abspath_or_URL = svn_cl__local_style_skip_ancestor(wc_path_prefix,
+                                                           abspath_or_URL,
+                                                           scratch_pool);
+
+      /* In verbose mode, print exactly same as "proplist" does;
+       * otherwise, print a brief header. */
+      if (inherited_property)
+        header = apr_psprintf(scratch_pool, like_proplist
+                              ? _("Properties inherited from '%s':\n")
+                              : "%s - ", abspath_or_URL);
+      else
+        header = apr_psprintf(scratch_pool, like_proplist
+                              ? _("Properties on '%s':\n")
+                              : "%s - ", abspath_or_URL);
+      SVN_ERR(svn_cmdline_cstring_from_utf8(&header, header, scratch_pool));
+      SVN_ERR(svn_subst_translate_cstring2(header, &header,
+                                           APR_EOL_STR,  /* 'native' eol */
+                                           FALSE, /* no repair */
+                                           NULL,  /* no keywords */
+                                           FALSE, /* no expansion */
+                                           scratch_pool));
+      SVN_ERR(stream_write(out, header, strlen(header)));
+    }
 
+  if (like_proplist)
+    {
+      /* Print the property name and value just as "proplist -v" does */
+      apr_hash_t *hash = apr_hash_make(scratch_pool);
+
+      apr_hash_set(hash, pname_utf8, APR_HASH_KEY_STRING, propval);
+      SVN_ERR(svn_cl__print_prop_hash(out, hash, FALSE, scratch_pool));
+    }
+  else
+    {
+      /* If this is a special Subversion property, it is stored as
+         UTF8, so convert to the native format. */
+      if (svn_prop_needs_translation(pname_utf8))
+        SVN_ERR(svn_subst_detranslate_string(&propval, propval,
+                                             TRUE, scratch_pool));
+
+      SVN_ERR(stream_write(out, propval->data, propval->len));
+
+      if (! omit_newline)
+        SVN_ERR(stream_write(out, APR_EOL_STR,
+                             strlen(APR_EOL_STR)));
+    }
   return SVN_NO_ERROR;
 }
 
+/* Print the properties in PROPS and/or *INHERITED_PROPS to the stream OUT.
+   PROPS is a hash mapping (const char *) path to (svn_string_t) property
+   value.  INHERITED_PROPS is a depth-first ordered array of
+   svn_prop_inherited_item_t * structures.
+
+   PROPS may be an empty hash, but is never null.  INHERITED_PROPS may be
+   null.
+
+   If IS_URL is true, all paths in PROPS are URLs, else all paths are local
+   paths.
+
+   PNAME_UTF8 is the property name of all the properties.
 
-/* Print the properties in PROPS to the stream OUT. PROPS is a hash mapping
- * (const char *) path to (svn_string_t) property value.
- * If IS_URL is true, all paths are URLs, else all paths are local paths.
- * PNAME_UTF8 is the property name of all the properties.
- * If PRINT_FILENAMES is true, print the item's path before each property.
- * If OMIT_NEWLINE is true, don't add a newline at the end of each property.
- * If LIKE_PROPLIST is true, print everything in a more verbose format
- * like "svn proplist -v" does.
- * */
+   If PRINT_FILENAMES is true, print the item's path before each property.
+
+   If OMIT_NEWLINE is true, don't add a newline at the end of each property.
+
+   If LIKE_PROPLIST is true, print everything in a more verbose format
+   like "svn proplist -v" does. */
 static svn_error_t *
 print_properties(svn_stream_t *out,
-                 svn_boolean_t is_url,
                  const char *pname_utf8,
                  apr_hash_t *props,
+                 apr_array_header_t *inherited_props,
                  svn_boolean_t print_filenames,
                  svn_boolean_t omit_newline,
                  svn_boolean_t like_proplist,
@@ -126,6 +249,24 @@ print_properties(svn_stream_t *out,
 
   SVN_ERR(svn_dirent_get_absolute(&path_prefix, "", pool));
 
+  if (inherited_props)
+    {
+      svn_pool_clear(iterpool);
+
+      for (i = 0; i < inherited_props->nelts; i++)
+        {
+          svn_prop_inherited_item_t *iprop =
+            APR_ARRAY_IDX(inherited_props, i, svn_prop_inherited_item_t *);
+          svn_string_t *propval = svn__apr_hash_index_val(apr_hash_first(pool,
+                                                          iprop->prop_hash));
+          SVN_ERR(print_single_prop(propval,
+                                    iprop->path_or_url,
+                                    path_prefix, out, pname_utf8,
+                                    print_filenames, omit_newline,
+                                    like_proplist, TRUE, iterpool));
+        }
+    }
+
   sorted_props = svn_sort__hash(props, svn_sort_compare_items_as_paths, pool);
   for (i = 0; i < sorted_props->nelts; i++)
     {
@@ -135,53 +276,10 @@ print_properties(svn_stream_t *out,
 
       svn_pool_clear(iterpool);
 
-      if (print_filenames)
-        {
-          const char *header;
-
-          /* Print the file name. */
-
-          if (! is_url)
-            filename = svn_cl__local_style_skip_ancestor(path_prefix, filename,
-                                                         iterpool);
-
-          /* In verbose mode, print exactly same as "proplist" does;
-           * otherwise, print a brief header. */
-          header = apr_psprintf(iterpool, like_proplist
-                                ? _("Properties on '%s':\n")
-                                : "%s - ", filename);
-          SVN_ERR(svn_cmdline_cstring_from_utf8(&header, header, iterpool));
-          SVN_ERR(svn_subst_translate_cstring2(header, &header,
-                                               APR_EOL_STR,  /* 'native' eol */
-                                               FALSE, /* no repair */
-                                               NULL,  /* no keywords */
-                                               FALSE, /* no expansion */
-                                               iterpool));
-          SVN_ERR(stream_write(out, header, strlen(header)));
-        }
-
-      if (like_proplist)
-        {
-          /* Print the property name and value just as "proplist -v" does */
-          apr_hash_t *hash = apr_hash_make(iterpool);
-
-          apr_hash_set(hash, pname_utf8, APR_HASH_KEY_STRING, propval);
-          SVN_ERR(svn_cl__print_prop_hash(out, hash, FALSE, iterpool));
-        }
-      else
-        {
-          /* If this is a special Subversion property, it is stored as
-             UTF8, so convert to the native format. */
-          if (svn_prop_needs_translation(pname_utf8))
-            SVN_ERR(svn_subst_detranslate_string(&propval, propval,
-                                                 TRUE, iterpool));
-
-          SVN_ERR(stream_write(out, propval->data, propval->len));
-
-          if (! omit_newline)
-            SVN_ERR(stream_write(out, APR_EOL_STR,
-                                 strlen(APR_EOL_STR)));
-        }
+      SVN_ERR(print_single_prop(propval, filename, path_prefix,
+                                out, pname_utf8, print_filenames,
+                                omit_newline, like_proplist, FALSE,
+                                iterpool));
     }
 
   svn_pool_destroy(iterpool);
@@ -234,6 +332,11 @@ svn_cl__propget(apr_getopt_t *os,
       const char *URL;
       svn_string_t *propval;
 
+      if (opt_state->show_inherited_props)
+        return svn_error_create(
+          SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+          _("--show-inherited-props can't be used with --revprop"));
+
       SVN_ERR(svn_cl__revprop_prepare(&opt_state->start_revision, targets,
                                       &URL, ctx, pool));
 
@@ -255,7 +358,8 @@ svn_cl__propget(apr_getopt_t *os,
                                     "revprops",
                                     "rev", revstr, NULL);
 
-              svn_cmdline__print_xml_prop(&sb, pname_utf8, propval, pool);
+              svn_cmdline__print_xml_prop(&sb, pname_utf8, propval, FALSE,
+                                          pool);
 
               svn_xml_make_close_tag(&sb, pool, "revprops");
 
@@ -310,6 +414,7 @@ svn_cl__propget(apr_getopt_t *os,
           svn_boolean_t like_proplist;
           const char *truepath;
           svn_opt_revision_t peg_revision;
+          apr_array_header_t *inherited_props;
 
           svn_pool_clear(subpool);
           SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
@@ -321,12 +426,15 @@ svn_cl__propget(apr_getopt_t *os,
           if (!svn_path_is_url(truepath))
             SVN_ERR(svn_dirent_get_absolute(&truepath, truepath, subpool));
 
-          SVN_ERR(svn_client_propget4(&props, pname_utf8, truepath,
-                                      &peg_revision,
-                                      &(opt_state->start_revision),
-                                      NULL, opt_state->depth,
-                                      opt_state->changelists, ctx, subpool,
-                                      subpool));
+          SVN_ERR(svn_client_propget5(
+            &props,
+            opt_state->show_inherited_props ? &inherited_props : NULL,
+            pname_utf8, truepath,
+            &peg_revision,
+            &(opt_state->start_revision),
+            NULL, opt_state->depth,
+            opt_state->changelists, ctx, subpool,
+            subpool));
 
           /* Any time there is more than one thing to print, or where
              the path associated with a printed thing is not obvious,
@@ -341,11 +449,17 @@ svn_cl__propget(apr_getopt_t *os,
           like_proplist = opt_state->verbose && !opt_state->strict;
 
           if (opt_state->xml)
-            SVN_ERR(print_properties_xml(pname_utf8, props, subpool));
+            SVN_ERR(print_properties_xml(
+              pname_utf8, props,
+              opt_state->show_inherited_props ? inherited_props : NULL,
+              subpool));
           else
-            SVN_ERR(print_properties(out, svn_path_is_url(target), pname_utf8,
-                                     props, print_filenames, omit_newline,
-                                     like_proplist, subpool));
+            SVN_ERR(print_properties(
+              out, pname_utf8,
+              props,
+              opt_state->show_inherited_props ? inherited_props : NULL,
+              print_filenames,
+              omit_newline, like_proplist, subpool));
         }
 
       if (opt_state->xml)

Modified: subversion/branches/master-passphrase/subversion/svn/proplist-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/proplist-cmd.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/proplist-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/proplist-cmd.c Tue Oct 30 20:03:28 2012
@@ -35,6 +35,7 @@
 #include "svn_dirent_uri.h"
 #include "svn_path.h"
 #include "svn_xml.h"
+#include "svn_props.h"
 #include "cl.h"
 
 #include "svn_private_config.h"
@@ -48,43 +49,81 @@ typedef struct proplist_baton_t
 
 /*** Code. ***/
 
-/* This implements the svn_proplist_receiver_t interface, printing XML to
+/* This implements the svn_proplist_receiver2_t interface, printing XML to
    stdout. */
 static svn_error_t *
 proplist_receiver_xml(void *baton,
                       const char *path,
                       apr_hash_t *prop_hash,
+                      apr_array_header_t *inherited_props,
                       apr_pool_t *pool)
 {
   svn_cl__opt_state_t *opt_state = ((proplist_baton_t *)baton)->opt_state;
   svn_boolean_t is_url = ((proplist_baton_t *)baton)->is_url;
-  svn_stringbuf_t *sb = NULL;
+  svn_stringbuf_t *sb;
   const char *name_local;
 
+  if (inherited_props && inherited_props->nelts)
+    {
+      int i;
+      apr_pool_t *iterpool = svn_pool_create(pool);
+
+      for (i = 0; i < inherited_props->nelts; i++)
+        {
+          svn_prop_inherited_item_t *iprop =
+            APR_ARRAY_IDX(inherited_props, i, svn_prop_inherited_item_t *);
+
+          sb = NULL;
+
+          if (svn_path_is_url(iprop->path_or_url))
+            name_local = iprop->path_or_url;
+          else
+            name_local = svn_dirent_local_style(iprop->path_or_url, iterpool);
+
+          svn_xml_make_open_tag(&sb, iterpool, svn_xml_normal, "target",
+                            "path", name_local, NULL);
+          SVN_ERR(svn_cl__print_xml_prop_hash(&sb, iprop->prop_hash,
+                                              (! opt_state->verbose),
+                                              TRUE, iterpool));
+          svn_xml_make_close_tag(&sb, iterpool, "target");
+          SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
+        }
+      svn_pool_destroy(iterpool);
+    }
+
   if (! is_url)
     name_local = svn_dirent_local_style(path, pool);
   else
     name_local = path;
 
-  /* "<target ...>" */
-  svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "target",
-                        "path", name_local, NULL);
+  sb = NULL;
 
-  SVN_ERR(svn_cl__print_xml_prop_hash(&sb, prop_hash, (! opt_state->verbose),
-                                      pool));
 
-  /* "</target>" */
-  svn_xml_make_close_tag(&sb, pool, "target");
+  if (prop_hash)
+    {
+      /* "<target ...>" */
+        svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "target",
+                              "path", name_local, NULL);
+
+        SVN_ERR(svn_cl__print_xml_prop_hash(&sb, prop_hash,
+                                            (! opt_state->verbose),
+                                            FALSE, pool));
+
+        /* "</target>" */
+        svn_xml_make_close_tag(&sb, pool, "target");
+        SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
+    }
 
-  return svn_cl__error_checked_fputs(sb->data, stdout);
+  return SVN_NO_ERROR;
 }
 
 
-/* This implements the svn_proplist_receiver_t interface. */
+/* This implements the svn_proplist_receiver2_t interface. */
 static svn_error_t *
 proplist_receiver(void *baton,
                   const char *path,
                   apr_hash_t *prop_hash,
+                  apr_array_header_t *inherited_props,
                   apr_pool_t *pool)
 {
   svn_cl__opt_state_t *opt_state = ((proplist_baton_t *)baton)->opt_state;
@@ -96,10 +135,46 @@ proplist_receiver(void *baton,
   else
     name_local = path;
 
-  if (!opt_state->quiet)
-    SVN_ERR(svn_cmdline_printf(pool, _("Properties on '%s':\n"), name_local));
-  return svn_cl__print_prop_hash(NULL, prop_hash, (! opt_state->verbose),
-                                 pool);
+  if (inherited_props)
+    {
+      int i;
+      apr_pool_t *iterpool = svn_pool_create(pool);
+
+      for (i = 0; i < inherited_props->nelts; i++)
+        {
+          svn_prop_inherited_item_t *iprop =
+            APR_ARRAY_IDX(inherited_props, i, svn_prop_inherited_item_t *);
+
+          svn_pool_clear(iterpool);
+
+          if (!opt_state->quiet)
+            {
+              if (svn_path_is_url(iprop->path_or_url))
+                SVN_ERR(svn_cmdline_printf(
+                  iterpool, _("Properties inherited from '%s':\n"),
+                  iprop->path_or_url));
+              else
+                SVN_ERR(svn_cmdline_printf(
+                  iterpool, _("Properties inherited from '%s':\n"),
+                  svn_dirent_local_style(iprop->path_or_url, iterpool)));
+            }
+
+          SVN_ERR(svn_cl__print_prop_hash(NULL, iprop->prop_hash,
+                                          (! opt_state->verbose), iterpool));
+        }
+      svn_pool_destroy(iterpool);
+    }
+
+  if (prop_hash && apr_hash_count(prop_hash))
+    {
+      if (!opt_state->quiet)
+        SVN_ERR(svn_cmdline_printf(pool, _("Properties on '%s':\n"),
+                                   name_local));
+      SVN_ERR(svn_cl__print_prop_hash(NULL, prop_hash, (! opt_state->verbose),
+                                      pool));
+    }
+
+  return SVN_NO_ERROR;
 }
 
 
@@ -129,6 +204,11 @@ svn_cl__proplist(apr_getopt_t *os,
       const char *URL;
       apr_hash_t *proplist;
 
+      if (opt_state->show_inherited_props)
+        return svn_error_create(
+          SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+          _("--show-inherited-props can't be used with --revprop"));
+
       SVN_ERR(svn_cl__revprop_prepare(&opt_state->start_revision, targets,
                                       &URL, ctx, scratch_pool));
 
@@ -147,8 +227,9 @@ svn_cl__proplist(apr_getopt_t *os,
           svn_xml_make_open_tag(&sb, scratch_pool, svn_xml_normal,
                                 "revprops",
                                 "rev", revstr, NULL);
-          SVN_ERR(svn_cl__print_xml_prop_hash
-                  (&sb, proplist, (! opt_state->verbose), scratch_pool));
+          SVN_ERR(svn_cl__print_xml_prop_hash(&sb, proplist,
+                                              (! opt_state->verbose), FALSE,
+                                              scratch_pool));
           svn_xml_make_close_tag(&sb, scratch_pool, "revprops");
 
           SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
@@ -169,7 +250,7 @@ svn_cl__proplist(apr_getopt_t *os,
     {
       int i;
       apr_pool_t *iterpool;
-      svn_proplist_receiver_t pl_receiver;
+      svn_proplist_receiver2_t pl_receiver;
 
       if (opt_state->xml)
         {
@@ -203,12 +284,13 @@ svn_cl__proplist(apr_getopt_t *os,
                                      iterpool));
 
           SVN_ERR(svn_cl__try(
-                   svn_client_proplist3(truepath, &peg_revision,
+                   svn_client_proplist4(truepath, &peg_revision,
                                         &(opt_state->start_revision),
                                         opt_state->depth,
                                         opt_state->changelists,
+                                        opt_state->show_inherited_props,
                                         pl_receiver, &pl_baton,
-                                        ctx, iterpool),
+                                        ctx, iterpool, iterpool),
                    errors, opt_state->quiet,
                    SVN_ERR_UNVERSIONED_RESOURCE,
                    SVN_ERR_ENTRY_NOT_FOUND,

Modified: subversion/branches/master-passphrase/subversion/svn/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/props.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/props.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/props.c Tue Oct 30 20:03:28 2012
@@ -153,6 +153,7 @@ svn_error_t *
 svn_cl__print_xml_prop_hash(svn_stringbuf_t **outstr,
                             apr_hash_t *prop_hash,
                             svn_boolean_t names_only,
+                            svn_boolean_t inherited_props,
                             apr_pool_t *pool)
 {
   apr_array_header_t *sorted_props;
@@ -171,8 +172,10 @@ svn_cl__print_xml_prop_hash(svn_stringbu
 
       if (names_only)
         {
-          svn_xml_make_open_tag(outstr, pool, svn_xml_self_closing, "property",
-                                "name", pname, NULL);
+          svn_xml_make_open_tag(
+            outstr, pool, svn_xml_self_closing,
+            inherited_props ? "inherited_property" : "property",
+            "name", pname, NULL);
         }
       else
         {
@@ -184,7 +187,8 @@ svn_cl__print_xml_prop_hash(svn_stringbu
 
           SVN_ERR(svn_cmdline_cstring_from_utf8(&pname_out, pname, pool));
 
-          svn_cmdline__print_xml_prop(outstr, pname_out, propval, pool);
+          svn_cmdline__print_xml_prop(outstr, pname_out, propval,
+                                      inherited_props, pool);
         }
     }
 

Modified: subversion/branches/master-passphrase/subversion/svn/resolve-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/resolve-cmd.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/resolve-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/resolve-cmd.c Tue Oct 30 20:03:28 2012
@@ -57,6 +57,7 @@ svn_cl__resolve(apr_getopt_t *os,
   svn_boolean_t had_error = FALSE;
   svn_wc_conflict_resolver_func2_t conflict_func2;
   void *conflict_baton2;
+  svn_cl__interactive_conflict_baton_t *b;
 
   switch (opt_state->accept_which)
     {
@@ -79,7 +80,7 @@ svn_cl__resolve(apr_getopt_t *os,
       conflict_choice = svn_wc_conflict_choose_mine_full;
       break;
     case svn_cl__accept_unspecified:
-      if (opt_state->conflict_func == NULL)
+      if (opt_state->non_interactive)
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                                 _("missing --accept option"));
       conflict_choice = svn_wc_conflict_choose_unspecified;
@@ -112,9 +113,16 @@ svn_cl__resolve(apr_getopt_t *os,
   conflict_func2 = ctx->conflict_func2;
   conflict_baton2 = ctx->conflict_baton2;
 
-  /* Store interactive resolver */
-  ctx->conflict_func2 = opt_state->conflict_func;
-  ctx->conflict_baton2 = opt_state->conflict_baton;
+  /* This subcommand always uses the interactive resolver function. */
+  ctx->conflict_func2 = svn_cl__conflict_func_interactive;
+  SVN_ERR(svn_cl__get_conflict_func_interactive_baton(&b,
+                                                      opt_state->accept_which,
+                                                      ctx->config,
+                                                      opt_state->editor_cmd,
+                                                      ctx->cancel_func,
+                                                      ctx->cancel_baton,
+                                                      scratch_pool));
+  ctx->conflict_baton2 = b;
 
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i < targets->nelts; i++)

Modified: subversion/branches/master-passphrase/subversion/svn/switch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/switch-cmd.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/switch-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/switch-cmd.c Tue Oct 30 20:03:28 2012
@@ -192,16 +192,11 @@ svn_cl__switch(apr_getopt_t *os,
         return svn_error_compose_create(externals_err, err);
     }
 
-  if (opt_state->conflict_func
-      && svn_cl__notifier_check_conflicts(nwb.wrapped_baton))
-    {
-      err = svn_cl__resolve_conflicts(
-              svn_cl__notifier_get_conflicted_paths(nwb.wrapped_baton,
-                                                    scratch_pool),
-              depth, opt_state, ctx, scratch_pool);
-      if (err)
-        return svn_error_compose_create(externals_err, err);
-    }
+  err = svn_cl__resolve_postponed_conflicts(ctx->conflict_baton2,
+                                            opt_state->depth,
+                                            opt_state->accept_which,
+                                            opt_state->editor_cmd,
+                                            ctx, scratch_pool);
 
   return svn_error_compose_create(externals_err, err);
 }

Modified: subversion/branches/master-passphrase/subversion/svn/update-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svn/update-cmd.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svn/update-cmd.c (original)
+++ subversion/branches/master-passphrase/subversion/svn/update-cmd.c Tue Oct 30 20:03:28 2012
@@ -110,8 +110,6 @@ svn_cl__update(apr_getopt_t *os,
   svn_boolean_t depth_is_sticky;
   struct svn_cl__check_externals_failed_notify_baton nwb;
   apr_array_header_t *result_revs;
-  svn_wc_conflict_resolver_func2_t conflict_func2 = ctx->conflict_func2;
-  void *conflict_baton2 = ctx->conflict_baton2;
   svn_error_t *err = SVN_NO_ERROR;
   svn_error_t *externals_err = SVN_NO_ERROR;
 
@@ -189,18 +187,11 @@ svn_cl__update(apr_getopt_t *os,
         return svn_error_compose_create(externals_err, err);
     }
 
-  if (opt_state->conflict_func
-      && svn_cl__notifier_check_conflicts(nwb.wrapped_baton))
-    {
-      ctx->conflict_func2 = conflict_func2;
-      ctx->conflict_baton2 = conflict_baton2;
-      err = svn_cl__resolve_conflicts(
-              svn_cl__notifier_get_conflicted_paths(nwb.wrapped_baton,
-                                                    scratch_pool),
-              depth, opt_state, ctx, scratch_pool);
-      if (err)
-        return svn_error_compose_create(externals_err, err);
-    }
+  err = svn_cl__resolve_postponed_conflicts(ctx->conflict_baton2,
+                                            opt_state->depth,
+                                            opt_state->accept_which,
+                                            opt_state->editor_cmd,
+                                            ctx, scratch_pool);
 
   return svn_error_compose_create(externals_err, err);
 }

Modified: subversion/branches/master-passphrase/subversion/svnadmin/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svnadmin/main.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svnadmin/main.c (original)
+++ subversion/branches/master-passphrase/subversion/svnadmin/main.c Tue Oct 30 20:03:28 2012
@@ -43,6 +43,7 @@
 #include "svn_xml.h"
 
 #include "private/svn_opt_private.h"
+#include "private/svn_named_atomic.h"
 
 #include "svn_private_config.h"
 
@@ -115,7 +116,8 @@ open_repos(svn_repos_t **repos,
   apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS,
                APR_HASH_KEY_STRING, "1");
   apr_hash_set(fs_config, SVN_FS_CONFIG_FSFS_CACHE_REVPROPS,
-               APR_HASH_KEY_STRING, "1");
+               APR_HASH_KEY_STRING,
+               svn_named_atomic__is_efficient() ? "1" : "0");
 
   /* now, open the requested repository */
   SVN_ERR(svn_repos_open2(repos, path, fs_config, pool));

Modified: subversion/branches/master-passphrase/subversion/svndumpfilter/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svndumpfilter/main.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svndumpfilter/main.c (original)
+++ subversion/branches/master-passphrase/subversion/svndumpfilter/main.c Tue Oct 30 20:03:28 2012
@@ -1526,6 +1526,8 @@ main(int argc, const char *argv[])
         {
           svn_stringbuf_t *buffer, *buffer_utf8;
           const char *utf8_targets_file;
+          apr_array_header_t *targets = apr_array_make(pool, 0,
+                                                       sizeof(const char *));
 
           /* We need to convert to UTF-8 now, even before we divide
              the targets into an array, because otherwise we wouldn't
@@ -1538,10 +1540,18 @@ main(int argc, const char *argv[])
                                                pool));
           SVN_INT_ERR(svn_utf_stringbuf_to_utf8(&buffer_utf8, buffer, pool));
 
-          opt_state.prefixes = apr_array_append(pool,
-                                    svn_cstring_split(buffer_utf8->data, "\n\r",
-                                                      TRUE, pool),
-                                    opt_state.prefixes);
+          targets = apr_array_append(pool,
+                         svn_cstring_split(buffer_utf8->data, "\n\r",
+                                           TRUE, pool),
+                         targets);
+
+          for (i = 0; i < targets->nelts; i++)
+            {
+              const char *prefix = APR_ARRAY_IDX(targets, i, const char *);
+              if (prefix[0] != '/')
+                prefix = apr_pstrcat(pool, "/", prefix, (char *)NULL);
+              APR_ARRAY_PUSH(opt_state.prefixes, const char *) = prefix;
+            }
         }
 
       if (apr_is_empty_array(opt_state.prefixes))

Modified: subversion/branches/master-passphrase/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svnlook/main.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svnlook/main.c (original)
+++ subversion/branches/master-passphrase/subversion/svnlook/main.c Tue Oct 30 20:03:28 2012
@@ -1792,7 +1792,7 @@ do_plist(svnlook_ctxt_t *c,
       if (verbose)
         {
           if (xml)
-            svn_cmdline__print_xml_prop(&sb, pname, propval, pool);
+            svn_cmdline__print_xml_prop(&sb, pname, propval, FALSE, pool);
           else
             {
               const char *pname_stdout;

Modified: subversion/branches/master-passphrase/subversion/svnrdump/load_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svnrdump/load_editor.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svnrdump/load_editor.c (original)
+++ subversion/branches/master-passphrase/subversion/svnrdump/load_editor.c Tue Oct 30 20:03:28 2012
@@ -704,6 +704,7 @@ new_node_record(void **node_baton,
       apr_size_t residual_close_count;
       apr_array_header_t *residual_open_path;
       int i;
+      apr_size_t n;
 
       /* Before attempting to handle the action, call open_directory
          for all the path components and set the directory baton
@@ -720,7 +721,7 @@ new_node_record(void **node_baton,
 
       /* First close all as many directories as there are after
          skip_ancestor, and then open fresh directories */
-      for (i = 0; i < residual_close_count; i ++)
+      for (n = 0; n < residual_close_count; n ++)
         {
           /* Don't worry about destroying the actual rb->db object,
              since the pool we're using has the lifetime of one

Modified: subversion/branches/master-passphrase/subversion/svnrdump/svnrdump.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svnrdump/svnrdump.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svnrdump/svnrdump.c (original)
+++ subversion/branches/master-passphrase/subversion/svnrdump/svnrdump.c Tue Oct 30 20:03:28 2012
@@ -270,7 +270,7 @@ init_client_context(svn_client_ctx_t **c
   SVN_ERR(svn_ra_initialize(pool));
 
   SVN_ERR(svn_config_ensure(config_dir, pool));
-  SVN_ERR(svn_client_create_context(&ctx, pool));
+  SVN_ERR(svn_client_create_context2(&ctx, NULL, pool));
 
   SVN_ERR(svn_config_get_config(&(ctx->config), config_dir, pool));
 

Modified: subversion/branches/master-passphrase/subversion/svnserve/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/master-passphrase/subversion/svnserve/main.c?rev=1403849&r1=1403848&r2=1403849&view=diff
==============================================================================
--- subversion/branches/master-passphrase/subversion/svnserve/main.c (original)
+++ subversion/branches/master-passphrase/subversion/svnserve/main.c Tue Oct 30 20:03:28 2012
@@ -149,6 +149,8 @@ void winservice_notify_stop(void)
 #define SVNSERVE_OPT_CACHE_FULLTEXTS 266
 #define SVNSERVE_OPT_CACHE_REVPROPS  267
 #define SVNSERVE_OPT_SINGLE_CONN     268
+#define SVNSERVE_OPT_CLIENT_SPEED    269
+#define SVNSERVE_OPT_VIRTUAL_HOST    270
 
 static const apr_getopt_option_t svnserve__options[] =
   {
@@ -235,6 +237,16 @@ static const apr_getopt_option_t svnserv
         "Default is no.\n"
         "                             "
         "[used for FSFS repositories only]")},
+    {"client-speed", SVNSERVE_OPT_CLIENT_SPEED, 1,
+     N_("Optimize throughput based on the assumption that\n"
+        "                             "
+        "clients can receive data with a bitrate of at\n"
+        "                             "
+        "least ARG Gbit/s.  For clients receiving data at\n"
+        "                             "
+        "less than 1 Gbit/s, zero should be used.\n"
+        "                             "
+        "Default is 0 (optimizations disabled).")},
 #ifdef CONNECTION_HAVE_THREAD_OPTION
     /* ### Making the assumption here that WIN32 never has fork and so
      * ### this option never exists when --service exists. */
@@ -266,6 +278,10 @@ static const apr_getopt_option_t svnserv
         "                             "
         "[mode: tunnel]")},
     {"help",             'h', 0, N_("display this help")},
+    {"virtual-host",     SVNSERVE_OPT_VIRTUAL_HOST, 0,
+     N_("virtual host mode (look for repo in directory\n"
+        "                             "
+        "of provided hostname)")},
     {"version",           SVNSERVE_OPT_VERSION, 0,
      N_("show program version information")},
     {"quiet",            'q', 0,
@@ -492,11 +508,14 @@ int main(int argc, const char *argv[])
   params.authzdb = NULL;
   params.compression_level = SVN_DELTA_COMPRESSION_LEVEL_DEFAULT;
   params.log_file = NULL;
+  params.vhost = FALSE;
   params.username_case = CASE_ASIS;
   params.memory_cache_size = (apr_uint64_t)-1;
   params.cache_fulltexts = TRUE;
   params.cache_txdeltas = FALSE;
   params.cache_revprops = FALSE;
+  params.zero_copy_limit = 0;
+  params.error_check_interval = 4096;
 
   while (1)
     {
@@ -645,6 +664,18 @@ int main(int argc, const char *argv[])
              = svn_tristate__from_word(arg) == svn_tristate_true;
           break;
 
+        case SVNSERVE_OPT_CLIENT_SPEED:
+          {
+            apr_size_t bandwidth = (apr_size_t)apr_strtoi64(arg, NULL, 0);
+
+            /* block other clients for at most 1 ms (at full bandwidth) */
+            params.zero_copy_limit = bandwidth * 120000;
+
+            /* check for aborted connections at the same rate */
+            params.error_check_interval = bandwidth * 120000;
+          }
+          break;
+
 #ifdef WIN32
         case SVNSERVE_OPT_SERVICE:
           if (run_mode != run_mode_service)
@@ -669,7 +700,11 @@ int main(int argc, const char *argv[])
                                               pool));
           break;
 
-        case SVNSERVE_OPT_LOG_FILE:
+         case SVNSERVE_OPT_VIRTUAL_HOST:
+           params.vhost = TRUE;
+           break;
+
+         case SVNSERVE_OPT_LOG_FILE:
           SVN_INT_ERR(svn_utf_cstring_to_utf8(&log_filename, arg, pool));
           log_filename = svn_dirent_internal_style(log_filename, pool);
           SVN_INT_ERR(svn_dirent_get_absolute(&log_filename, log_filename,
@@ -755,8 +790,10 @@ int main(int argc, const char *argv[])
        * the pool cleanup handlers that call sasl_dispose() (connection_pool)
        * and sasl_done() (pool) are run in the right order. See issue #3664. */
       connection_pool = svn_pool_create(pool);
-      conn = svn_ra_svn_create_conn2(NULL, in_file, out_file,
+      conn = svn_ra_svn_create_conn3(NULL, in_file, out_file,
                                      params.compression_level,
+                                     params.zero_copy_limit,
+                                     params.error_check_interval,
                                      connection_pool);
       svn_error_clear(serve(conn, &params, connection_pool));
       exit(0);
@@ -925,7 +962,7 @@ int main(int argc, const char *argv[])
     settings.single_threaded = TRUE;
     if (handling_mode == connection_mode_thread)
       {
-#ifdef APR_HAS_THREADS
+#if APR_HAS_THREADS
         settings.single_threaded = FALSE;
 #else
         /* No requests will be processed at all
@@ -988,8 +1025,10 @@ int main(int argc, const char *argv[])
           /* It's not a fatal error if we cannot enable keep-alives. */
         }
 
-      conn = svn_ra_svn_create_conn2(usock, NULL, NULL,
+      conn = svn_ra_svn_create_conn3(usock, NULL, NULL,
                                      params.compression_level,
+                                     params.zero_copy_limit,
+                                     params.error_check_interval,
                                      connection_pool);
 
       if (run_mode == run_mode_listen_once)