You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by vm...@apache.org on 2012/12/23 19:34:20 UTC

svn commit: r1425508 [14/17] - in /subversion/branches/javahl-ra: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/hudson/ notes/ notes/api-errata/1.8/ notes/obliterate/ notes/tree-conflicts/ subversion/ subversion/bindings/...

Modified: subversion/branches/javahl-ra/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/main.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/main.c Sun Dec 23 18:34:14 2012
@@ -129,8 +129,9 @@ typedef enum svn_cl__longopt_t {
   opt_diff,
   opt_allow_mixed_revisions,
   opt_include_externals,
+  opt_show_inherited_props,
   opt_search,
-  opt_isearch,
+  opt_search_and,
 } svn_cl__longopt_t;
 
 
@@ -184,37 +185,23 @@ const apr_getopt_option_t svn_cl__option
   {"username",      opt_auth_username, 1, N_("specify a username ARG")},
   {"password",      opt_auth_password, 1, N_("specify a password ARG")},
   {"extensions",    'x', 1,
-                    N_("Default: '-u'. When Subversion is invoking an\n"
+                    N_("Specify differencing options for external diff or\n"
                        "                             "
-                       "external diff program, ARG is simply passed along\n"
+                       "internal diff or blame. Default: '-u'. Options are\n"
                        "                             "
-                       "to the program. But when Subversion is using its\n"
+                       "separated by spaces. Internal diff and blame take:\n"
                        "                             "
-                       "default internal diff implementation, or when\n"
+                       "  -u, --unified: Show 3 lines of unified context\n"
                        "                             "
-                       "Subversion is displaying blame annotations, ARG\n"
+                       "  -b, --ignore-space-change: Ignore changes in\n"
                        "                             "
-                       "could be any of the following:\n"
+                       "    amount of white space\n"
                        "                             "
-                       "   -u (--unified):\n"
+                       "  -w, --ignore-all-space: Ignore all white space\n"
                        "                             "
-                       "      Output 3 lines of unified context.\n"
+                       "  --ignore-eol-style: Ignore changes in EOL style\n"
                        "                             "
-                       "   -b (--ignore-space-change):\n"
-                       "                             "
-                       "      Ignore changes in the amount of white space.\n"
-                       "                             "
-                       "   -w (--ignore-all-space):\n"
-                       "                             "
-                       "      Ignore all white space.\n"
-                       "                             "
-                       "   --ignore-eol-style:\n"
-                       "                             "
-                       "      Ignore changes in EOL style.\n"
-                       "                             "
-                       "   -p (--show-c-function):\n"
-                       "                             "
-                       "      Show C function name in diff output.")},
+                       "  -p, --show-c-function: Show C function name")},
   {"targets",       opt_targets, 1,
                     N_("pass contents of file ARG as additional args")},
   {"depth",         opt_depth, 1,
@@ -363,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"
                        "                             "
@@ -374,11 +361,12 @@ 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)")},
-
-  {"isearch", opt_isearch, 1,
-                       N_("like --search, but case-insensitive")}, 
+  {"search-and", opt_search_and, 1,
+                       N_("combine ARG with the previous search pattern")},
 
   /* Long-opt Aliases
    *
@@ -500,25 +488,22 @@ 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"
-     "contact the repository.  As such, they may not, by default, be able\n"
-     "to propagate merge tracking information from the source of the copy\n"
-     "to the destination.\n"),
+     "  WARNING: For compatibility with previous versions of Subversion,\n"
+     "  copies performed using two working copy paths (WC -> WC) will not\n"
+     "  contact the repository.  As such, they may not, by default, be able\n"
+     "  to propagate merge tracking information from the source of the copy\n"
+     "  to the destination.\n"),
     {'r', 'q', opt_ignore_externals, opt_parents, SVN_CL__LOG_MSG_OPTIONS} },
 
   { "delete", svn_cl__delete, {"del", "remove", "rm"}, N_
@@ -684,12 +669,18 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  and limits the scope of the displayed diff to the specified depth.\n"
      "\n"
      "  If the --search option is used, log messages are displayed only if the\n"
-     "  provided search pattern matches the author, date, log message text,\n"
-     "  or, if the --verbose option is also provided, a changed path.\n"
-     "  The search pattern may include glob syntax wildcards:\n"
+     "  provided search pattern matches any of the author, date, log message\n"
+     "  text (unless --quiet is used), or, if the --verbose option is also\n"
+     "  provided, a changed path.\n"
+     "  The search pattern may include \"glob syntax\" wildcards:\n"
      "      ?      matches any single character\n"
      "      *      matches a sequence of arbitrary characters\n"
-     "      [...]  matches any of the characters listed inside the brackets\n"
+     "      [abc]  matches any of the characters listed inside the brackets\n"
+     "  If multiple --search options are provided, a log message is shown if\n"
+     "  it matches any of the provided search patterns. If the --search-and\n"
+     "  option is used, that option's argument is combined with the pattern\n"
+     "  from the previous --search or --search-and option, and a log message\n"
+     "  is shown only if it matches the combined search pattern.\n"
      "  If --limit is used in combination with --search, --limit restricts the\n"
      "  number of log messages searched, rather than restricting the output\n"
      "  to a particular number of matching log messages.\n"
@@ -722,7 +713,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
     {'r', 'q', 'v', 'g', 'c', opt_targets, opt_stop_on_copy, opt_incremental,
      opt_xml, 'l', opt_with_all_revprops, opt_with_no_revprops, opt_with_revprop,
      opt_depth, opt_diff, opt_diff_cmd, opt_internal_diff, 'x', opt_search,
-     opt_isearch},
+     opt_search_and, },
     {{opt_with_revprop, N_("retrieve revision property ARG")},
      {'c', N_("the change made in revision ARG")}} },
 
@@ -732,19 +723,22 @@ const svn_opt_subcommand_desc2_t svn_cl_
        * (with quotes and newlines removed). */
 "Merge changes into a working copy.\n"
 "usage: 1. merge SOURCE[@REV] [TARGET_WCPATH]\n"
-"          (the 'sync' merge)\n"
+"          (the 'automatic' merge)\n"
 "       2. merge [-c M[,N...] | -r N:M ...] SOURCE[@REV] [TARGET_WCPATH]\n"
 "          (the 'cherry-pick' merge)\n"
 "       3. merge SOURCE1[@N] SOURCE2[@M] [TARGET_WCPATH]\n"
 "          (the '2-URL' merge)\n"
 "\n"
-"  1. This form, with one source path and no revision range:\n"
+"  1. This form, with one source path and no revision range, is called\n"
+"     an 'automatic' merge:\n"
 "\n"
 "       svn merge SOURCE[@REV] [TARGET_WCPATH]\n"
 "\n"
-"     finds all the changes on the source branch that have not already been\n"
-"     merged to the target branch, and merges them. Merge tracking is used\n"
-"     to know which changes have already been merged.\n"
+"     The automatic merge is used for the 'sync' and 'reintegrate' merges\n"
+"     in the 'feature branch' pattern described below. It finds all the\n"
+"     changes on the source branch that have not already been merged to the\n"
+"     target branch, and merges them into the working copy. Merge tracking\n"
+"     is used to know which changes have already been merged.\n"
 "\n"
 "     SOURCE specifies the branch from where the changes will be pulled, and\n"
 "     TARGET_WCPATH specifies a working copy of the target branch to which\n"
@@ -766,43 +760,38 @@ const svn_opt_subcommand_desc2_t svn_cl_
 "\n"
 "       - The 'Feature Branch' Merging Pattern -\n"
 "\n"
-"     In this commonly used pattern of merging, a developer is working on\n"
-"     a feature development branch, committing a series of changes that\n"
-"     implement the feature. The developer periodically merges all the\n"
-"     latest changes from the 'parent' branch (from which the feature branch\n"
-"     is branched off). When the feature development is complete, the\n"
-"     developer integrates the feature back into the parent branch by\n"
-"     merging the other way, into a trunk working copy.\n"
-"\n"
-"         trunk  --+----------o------o-o-------------o--\n"
-"                   \\           \\          \\     /\n"
-"                    \\         merge       merge merge\n"
-"                     \\           \\          \\ /\n"
+"     In this commonly used work flow, known also as the 'development\n"
+"     branch' pattern, a developer creates a branch and commits a series of\n"
+"     changes that implement a new feature. The developer periodically\n"
+"     merges all the latest changes from the parent branch so as to keep the\n"
+"     development branch up to date with those changes. When the feature is\n"
+"     complete, the developer performs a merge from the feature branch to\n"
+"     the parent branch to re-integrate the changes.\n"
+"\n"
+"         parent --+----------o------o-o-------------o--\n"
+"                   \\            \\           \\      /\n"
+"                    \\          merge      merge  merge\n"
+"                     \\            \\           \\  /\n"
 "         feature      +--o-o-------o----o-o----o-------\n"
 "\n"
-"     In this pattern, a merge from the parent branch to the feature branch\n"
-"     is known as a 'sync' merge (or 'catch-up' merge), and a merge from the\n"
-"     feature branch to the parent branch may be called a 'reintegrate'\n"
-"     merge. The 'sync' merges are normally low-risk because the parent\n"
-"     branch is considered to be more 'stable' than the feature branch, in\n"
-"     the sense of being less likely to contain incomplete or broken work.\n"
-"     By syncing often, these merges can be kept small, avoiding the need\n"
-"     for a difficult 'big bang' merge at reintegration time.\n"
+"     A merge from the parent branch to the feature branch is called a\n"
+"     'sync' or 'catch-up' merge, and a merge from the feature branch to the\n"
+"     parent branch is called a 'reintegrate' merge.\n"
 "\n"
 "       - Sync Merge Example -\n"
 "                                 ............\n"
 "                                .            .\n"
 "         trunk  --+------------L--------------R------\n"
-"                   \\                          \\\n"
-"                    \\                         |\n"
-"                     \\                        v\n"
+"                   \\                           \\\n"
+"                    \\                          |\n"
+"                     \\                         v\n"
 "         feature      +------------------------o-----\n"
 "                             r100            r200\n"
 "\n"
 "     Subversion will locate all the changes on 'trunk' that have not yet\n"
 "     been merged into the 'feature' branch. In this case that is a single\n"
-"     range, r100:200. In the diagram above, L marks the left side\n"
-"     (trunk@100) and R marks the right side (trunk@200) of the merge. The\n"
+"     range, r100:200. In the diagram above, L marks the left side (trunk@100)\n"
+"     and R marks the right side (trunk@200) of the merge source. The\n"
 "     difference between L and R will be applied to the target working copy\n"
 "     path. In this case, the working copy is a clean checkout of the entire\n"
 "     'feature' branch.\n"
@@ -817,7 +806,6 @@ const svn_opt_subcommand_desc2_t svn_cl_
 "     others. You can review the changes and you may have to resolve\n"
 "     conflicts before you commit the merge.\n"
 "\n"
-"\n"
 "       - Reintegrate Merge Example -\n"
 "\n"
 "     The feature branch was last synced with trunk up to revision X. So the\n"
@@ -827,9 +815,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
 "\n"
 "                    rW                   rX\n"
 "         trunk ------+--------------------L------------------o\n"
-"                      \\                   .                 ^\n"
-"                       \\                   .............   /\n"
-"                        \\                               . /\n"
+"                      \\                    .                 ^\n"
+"                       \\                    .............   /\n"
+"                        \\                                . /\n"
 "         feature         +--------------------------------R\n"
 "\n"
 "     In the diagram above, L marks the left side (trunk@X) and R marks the\n"
@@ -1048,17 +1036,31 @@ const svn_opt_subcommand_desc2_t svn_cl_
 
   { "mergeinfo", svn_cl__mergeinfo, {0}, N_
     ("Display merge-related information.\n"
-     "usage: mergeinfo SOURCE[@REV] [TARGET[@REV]]\n"
+     "usage: 1. mergeinfo SOURCE[@REV] [TARGET[@REV]]\n"
+     "       2. mergeinfo --show-revs=WHICH SOURCE[@REV] [TARGET[@REV]]\n"
      "\n"
-     "  Display information related to merges (or potential merges) between\n"
-     "  SOURCE and TARGET (default: '.').  Display the type of information\n"
-     "  specified by the --show-revs option.  If --show-revs isn't passed,\n"
-     "  it defaults to --show-revs='merged'.\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"
+     "  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} },
@@ -1081,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"
@@ -1162,7 +1170,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  2. Edits unversioned remote prop on repos revision.\n"
      "     TARGET only determines which repository to access.\n"
      "\n"
-     "See 'svn help propset' for more on setting properties.\n"),
+     "  See 'svn help propset' for more on setting properties.\n"),
     {'r', opt_revprop, SVN_CL__LOG_MSG_OPTIONS, opt_force} },
 
   { "propget", svn_cl__propget, {"pget", "pg"}, N_
@@ -1185,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")}} },
 
@@ -1201,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")}} },
 
@@ -1579,11 +1588,50 @@ svn_cl__check_cancel(void *baton)
     return SVN_NO_ERROR;
 }
 
+/* Add a --search argument to OPT_STATE.
+ * These options start a new search pattern group. */
+static void
+add_search_pattern_group(svn_cl__opt_state_t *opt_state,
+                         const char *pattern,
+                         apr_pool_t *result_pool)
+{
+  apr_array_header_t *group = NULL;
+
+  if (opt_state->search_patterns == NULL)
+    opt_state->search_patterns = apr_array_make(result_pool, 1,
+                                                sizeof(apr_array_header_t *));
+
+  group = apr_array_make(result_pool, 1, sizeof(const char *));
+  APR_ARRAY_PUSH(group, const char *) = pattern;
+  APR_ARRAY_PUSH(opt_state->search_patterns, apr_array_header_t *) = group;
+}
+
+/* Add a --search-and argument to OPT_STATE.
+ * These patterns are added to an existing pattern group, if any. */
+static void
+add_search_pattern_to_latest_group(svn_cl__opt_state_t *opt_state,
+                                   const char *pattern,
+                                   apr_pool_t *result_pool)
+{
+  apr_array_header_t *group;
+
+  if (opt_state->search_patterns == NULL)
+    {
+      add_search_pattern_group(opt_state, pattern, result_pool);
+      return;
+    }
+
+  group = APR_ARRAY_IDX(opt_state->search_patterns,
+                        opt_state->search_patterns->nelts - 1,
+                        apr_array_header_t *);
+  APR_ARRAY_PUSH(group, const char *) = pattern;
+}
 
 
 /*** 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: ")
 
@@ -1616,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));
 
@@ -1644,7 +1694,7 @@ sub_main(int argc, const char *argv[], a
   opt_state.depth = svn_depth_unknown;
   opt_state.set_depth = svn_depth_unknown;
   opt_state.accept_which = svn_cl__accept_unspecified;
-  opt_state.show_revs = svn_cl__show_revs_merged;
+  opt_state.show_revs = svn_cl__show_revs_invalid;
 
   /* No args?  Show usage. */
   if (argc <= 1)
@@ -2126,16 +2176,17 @@ 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;
       case opt_search:
-        opt_state.search_pattern = opt_arg;
-        break;
-      case opt_isearch:
-        opt_state.search_pattern = opt_arg;
-        opt_state.case_insensitive_search = TRUE;
+        add_search_pattern_group(&opt_state, opt_arg, pool);
         break;
+      case opt_search_and:
+        add_search_pattern_to_latest_group(&opt_state, opt_arg, pool);
       default:
         /* Hmmm. Perhaps this would be a good place to squirrel away
            opts that commands like svn diff might need. Hmmm indeed. */
@@ -2336,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
@@ -2418,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)
@@ -2620,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/javahl-ra/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/merge-cmd.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/merge-cmd.c Sun Dec 23 18:34:14 2012
@@ -120,19 +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_boolean_t reintegrate_like;
+  svn_client_symmetric_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_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));
 
-  reintegrate_like = (merge->mid != NULL);
-
-  if (reintegrate_like)
+  if (svn_client_symmetric_merge_is_reintegrate_like(merge))
     {
       if (record_only)
         return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
@@ -160,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_symmetric_merge(merge, target_wcpath, depth,
+                                        force, record_only,
+                                        dry_run, merge_options,
+                                        ctx, scratch_pool));
 
   return SVN_NO_ERROR;
 }
@@ -524,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/javahl-ra/subversion/svn/mergeinfo-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/mergeinfo-cmd.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/mergeinfo-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/mergeinfo-cmd.c Sun Dec 23 18:34:14 2012
@@ -37,6 +37,7 @@
 #include "cl.h"
 
 #include "svn_private_config.h"
+#include "private/svn_client_private.h"
 
 
 /*** Code. ***/
@@ -55,6 +56,187 @@ print_log_rev(void *baton,
   return SVN_NO_ERROR;
 }
 
+/* Draw a diagram (by printing text to the console) summarizing the state
+ * of merging between two branches, given the merge description
+ * indicated by YCA, BASE, RIGHT, TARGET, REINTEGRATE_LIKE. */
+static svn_error_t *
+mergeinfo_diagram(svn_client__pathrev_t *yca,
+                  svn_client__pathrev_t *base,
+                  svn_client__pathrev_t *right,
+                  svn_client__pathrev_t *target,
+                  svn_boolean_t target_is_wc,
+                  svn_boolean_t reintegrate_like,
+                  apr_pool_t *pool)
+{
+  /* The graph occupies 4 rows of text, and the annotations occupy
+   * another 2 rows above and 2 rows below.  The graph is constructed
+   * from left to right in discrete sections ("columns"), each of which
+   * can have a different width (measured in characters).  Each element in
+   * the array is either a text string of the appropriate width, or can
+   * be NULL to draw a blank cell. */
+#define ROWS 8
+#define COLS 4
+  const char *g[ROWS][COLS] = {{0}};
+  int col_width[COLS];
+  int row, col;
+
+  /* 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] = "     --| |--";
+    }
+  else if (strcmp(yca->url, target->url) == 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] = "     --| |--";
+    }
+
+  /* The last full merge */
+  if ((base->rev > yca->rev) && reintegrate_like)
+    {
+      g[2][2] = "---------";
+      g[3][2] = "  /      ";
+      g[4][2] = " /       ";
+      g[5][2] = "---------";
+      g[6][2] = "|        ";
+      g[7][2] = apr_psprintf(pool, "%-8ld ", base->rev);
+    }
+  else if (base->rev > yca->rev)
+    {
+      g[0][2] = apr_psprintf(pool, "%-8ld ", base->rev);
+      g[1][2] = "|        ";
+      g[2][2] = "---------";
+      g[3][2] = " \\       ";
+      g[4][2] = "  \\      ";
+      g[5][2] = "---------";
+    }
+  else
+    {
+      g[2][2] = "---------";
+      g[3][2] = "         ";
+      g[4][2] = "         ";
+      g[5][2] = "---------";
+    }
+
+  /* The tips of the branches */
+    {
+      g[0][3] = apr_psprintf(pool, "%-8ld", right->rev);
+      g[1][3] = "|       ";
+      g[2][3] = "-       ";
+      g[3][3] = "        ";
+      g[4][3] = "        ";
+      g[5][3] = "-       ";
+      g[6][3] = "|       ";
+      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 */
+  for (col = 0; col < COLS; col++)
+    {
+      col_width[col] = 0;
+      for (row = 0; row < ROWS; row++)
+        {
+          if (g[row][col] && (strlen(g[row][col]) > col_width[col]))
+            col_width[col] = strlen(g[row][col]);
+        }
+    }
+
+  /* Column headings */
+  SVN_ERR(svn_cmdline_fputs(
+            _("    youngest  last               repos.\n"
+              "    common    full     tip of    path of\n"
+              "    ancestor  merge    branch    branch\n"
+              "\n"),
+            stdout, pool));
+
+  /* Print the diagram, row by row */
+  for (row = 0; row < ROWS; row++)
+    {
+      SVN_ERR(svn_cmdline_fputs("  ", stdout, pool));
+      for (col = 0; col < COLS; col++)
+        {
+          if (g[row][col])
+            {
+              SVN_ERR(svn_cmdline_fputs(g[row][col], stdout, pool));
+            }
+          else
+            {
+              /* Print <column-width> spaces */
+              SVN_ERR(svn_cmdline_printf(pool, "%*s", col_width[col], ""));
+            }
+        }
+      if (row == 2)
+        SVN_ERR(svn_cmdline_printf(pool, "  %s",
+                svn_client__pathrev_relpath(right, pool)));
+      if (row == 5)
+        SVN_ERR(svn_cmdline_printf(pool, "  %s",
+                svn_client__pathrev_relpath(target, pool)));
+      SVN_ERR(svn_cmdline_fputs("\n", stdout, pool));
+    }
+
+  return SVN_NO_ERROR;
+}
+
+/* Display a summary of the state of merging between the two branches
+ * SOURCE_PATH_OR_URL@SOURCE_REVISION and
+ * TARGET_PATH_OR_URL@TARGET_REVISION. */
+static svn_error_t *
+mergeinfo_summary(
+                  const char *source_path_or_url,
+                  const svn_opt_revision_t *source_revision,
+                  const char *target_path_or_url,
+                  const svn_opt_revision_t *target_revision,
+                  svn_client_ctx_t *ctx,
+                  apr_pool_t *pool)
+{
+  svn_client_symmetric_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_revision->kind == svn_opt_revision_unspecified
+                     || target_revision->kind == svn_opt_revision_working);
+  if (target_is_wc)
+    SVN_ERR(svn_client_find_symmetric_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(
+              &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(
+            &yca, &base, &right, &target, the_merge, pool));
+  reintegrate_like = svn_client_symmetric_merge_is_reintegrate_like(the_merge);
+
+  SVN_ERR(mergeinfo_diagram(yca, base, right, target,
+                            target_is_wc, reintegrate_like,
+                            pool));
+
+  return SVN_NO_ERROR;
+}
+
 /* This implements the `svn_opt_subcommand_t' interface. */
 svn_error_t *
 svn_cl__mergeinfo(apr_getopt_t *os,
@@ -74,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,
@@ -101,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))
@@ -140,5 +321,11 @@ svn_cl__mergeinfo(apr_getopt_t *os,
                                         TRUE, depth, NULL, ctx,
                                         pool));
     }
+  else
+    {
+      SVN_ERR(mergeinfo_summary(source, &src_peg_revision,
+                                target, &tgt_peg_revision,
+                                ctx, pool));
+    }
   return SVN_NO_ERROR;
 }

Modified: subversion/branches/javahl-ra/subversion/svn/move-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/move-cmd.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/move-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/move-cmd.c Sun Dec 23 18:34:14 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/javahl-ra/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/notify.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/notify.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/notify.c Sun Dec 23 18:34:14 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/javahl-ra/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/propedit-cmd.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/propedit-cmd.c Sun Dec 23 18:34:14 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/javahl-ra/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/propget-cmd.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/propget-cmd.c Sun Dec 23 18:34:14 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/javahl-ra/subversion/svn/proplist-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/proplist-cmd.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/proplist-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/proplist-cmd.c Sun Dec 23 18:34:14 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_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/javahl-ra/subversion/svn/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/props.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/props.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/props.c Sun Dec 23 18:34:14 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/javahl-ra/subversion/svn/resolve-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/resolve-cmd.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/resolve-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/resolve-cmd.c Sun Dec 23 18:34:14 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/javahl-ra/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/status-cmd.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/status-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/status-cmd.c Sun Dec 23 18:34:14 2012
@@ -377,7 +377,7 @@ svn_cl__status(apr_getopt_t *os,
              ### non-changelist entries. */
           if (opt_state->xml)
             {
-              svn_stringbuf_set(buf, "");
+              svn_stringbuf_setempty(buf);
               svn_xml_make_open_tag(&buf, scratch_pool, svn_xml_normal,
                                     "changelist", "name", changelist_name,
                                     NULL);
@@ -398,7 +398,7 @@ svn_cl__status(apr_getopt_t *os,
 
           if (opt_state->xml)
             {
-              svn_stringbuf_set(buf, "");
+              svn_stringbuf_setempty(buf);
               svn_xml_make_close_tag(&buf, scratch_pool, "changelist");
               SVN_ERR(svn_cl__error_checked_fputs(buf->data, stdout));
             }

Modified: subversion/branches/javahl-ra/subversion/svn/switch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/switch-cmd.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/switch-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/switch-cmd.c Sun Dec 23 18:34:14 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/javahl-ra/subversion/svn/update-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn/update-cmd.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn/update-cmd.c (original)
+++ subversion/branches/javahl-ra/subversion/svn/update-cmd.c Sun Dec 23 18:34:14 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/javahl-ra/subversion/svn_private_config.hw
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svn_private_config.hw?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svn_private_config.hw (original)
+++ subversion/branches/javahl-ra/subversion/svn_private_config.hw Sun Dec 23 18:34:14 2012
@@ -83,6 +83,7 @@
 #include <libintl.h>
 #define _(x) dgettext(PACKAGE_NAME, x)
 #define Q_(x1, x2, n) dngettext(PACKAGE_NAME, x1, x2, n)
+#define HAVE_BIND_TEXTDOMAIN_CODESET
 #else
 #define _(x) (x)
 #define Q_(x1, x2, n) (((n) == 1) ? x1 : x2)

Modified: subversion/branches/javahl-ra/subversion/svndumpfilter/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/javahl-ra/subversion/svndumpfilter/main.c?rev=1425508&r1=1425507&r2=1425508&view=diff
==============================================================================
--- subversion/branches/javahl-ra/subversion/svndumpfilter/main.c (original)
+++ subversion/branches/javahl-ra/subversion/svndumpfilter/main.c Sun Dec 23 18:34:14 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))