You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/11/04 21:48:30 UTC

svn commit: r1031230 [15/21] - in /subversion/branches/py-tests-as-modules: ./ build/ build/ac-macros/ build/win32/ contrib/client-side/ notes/ notes/http-and-webdav/ notes/wc-ng/ subversion/bindings/ctypes-python/csvn/ subversion/bindings/javahl/nativ...

Modified: subversion/branches/py-tests-as-modules/subversion/svn/cl.h
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/cl.h?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/cl.h (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/cl.h Thu Nov  4 20:48:21 2010
@@ -221,15 +221,15 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t reintegrate;     /* use "reintegrate" merge-source heuristic */
   svn_boolean_t trust_server_cert; /* trust server SSL certs that would
                                       otherwise be rejected as "untrusted" */
-  int strip_count; /* number of leading path components to strip */
+  int strip; /* number of leading path components to strip */
   svn_boolean_t ignore_keywords;  /* do not expand keywords */
   svn_boolean_t reverse_diff;     /* reverse a diff (e.g. when patching) */
   svn_boolean_t ignore_whitespace; /* don't account for whitespace when
                                       patching */
-  svn_boolean_t show_diff;        /* produce diff output */
+  svn_boolean_t show_diff;        /* produce diff output (maps to --diff) */
   svn_boolean_t internal_diff;    /* override diff_cmd in config file */
   svn_boolean_t use_git_diff_format; /* Use git's extended diff format */
-  svn_boolean_t old_patch_target_names; /* Use target names from old side */
+  svn_boolean_t allow_mixed_rev; /* Allow operation on mixed-revision WC */
 } svn_cl__opt_state_t;
 
 
@@ -270,6 +270,7 @@ svn_opt_subcommand_t
   svn_cl__propget,
   svn_cl__proplist,
   svn_cl__propset,
+  svn_cl__relocate,
   svn_cl__revert,
   svn_cl__resolve,
   svn_cl__resolved,
@@ -417,15 +418,18 @@ svn_cl__print_status_xml(const char *pat
                          apr_pool_t *pool);
 
 
-/* Print a hash that maps property names (char *) to property values
-   (svn_string_t *).  The names are assumed to be in UTF-8 format;
+/* Print to stdout a hash that maps property names (char *) to property
+   values (svn_string_t *).  The names are assumed to be in UTF-8 format;
    the values are either in UTF-8 (the special Subversion props) or
    plain binary values.
 
+   If OUT is not NULL, then write to it rather than stdout.
+
    If NAMES_ONLY is true, print just names, else print names and
    values. */
 svn_error_t *
-svn_cl__print_prop_hash(apr_hash_t *prop_hash,
+svn_cl__print_prop_hash(svn_stream_t *out,
+                        apr_hash_t *prop_hash,
                         svn_boolean_t names_only,
                         apr_pool_t *pool);
 
@@ -626,7 +630,10 @@ svn_cl__cleanup_log_msg(void *log_msg_ba
 svn_error_t *
 svn_cl__may_need_force(svn_error_t *err);
 
-/* Write the STRING to the stdio STREAM, returning an error if it fails. */
+/* Write the STRING to the stdio STREAM, returning an error if it fails.
+
+   This function is equal to svn_cmdline_fputs() minus the utf8->local
+   encoding translation.  */
 svn_error_t *
 svn_cl__error_checked_fputs(const char *string, FILE* stream);
 

Modified: subversion/branches/py-tests-as-modules/subversion/svn/commit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/commit-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/commit-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/commit-cmd.c Thu Nov  4 20:48:21 2010
@@ -97,6 +97,21 @@ svn_cl__commit(apr_getopt_t *os,
   if (opt_state->depth == svn_depth_unknown)
     opt_state->depth = svn_depth_infinity;
 
+  /* Copies are done server-side, and cheaply, which means they're
+   * effectively always done with infinite depth.
+   * This is a potential cause of confusion for users trying to commit
+   * copied subtrees in part by restricting the commit's depth.
+   * See issue #3699. */
+  if (opt_state->depth < svn_depth_infinity)
+    SVN_ERR(svn_cmdline_printf(pool,
+                               _("svn: warning: The depth of this commit "
+                                 "is '%s', but copied directories will "
+                                 "regardless be committed with depth '%s'. "
+                                 "You must remove unwanted children of those "
+                                 "directories in a separate commit.\n"),
+                               svn_depth_to_word(opt_state->depth),
+                               svn_depth_to_word(svn_depth_infinity)));
+    
   cfg = apr_hash_get(ctx->config, SVN_CONFIG_CATEGORY_CONFIG,
                      APR_HASH_KEY_STRING);
   if (cfg)

Modified: subversion/branches/py-tests-as-modules/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/conflict-callbacks.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/conflict-callbacks.c Thu Nov  4 20:48:21 2010
@@ -470,34 +470,34 @@ svn_cl__conflict_handler(svn_wc_conflict
             {
               prompt = apr_pstrcat(subpool, prompt,
                                    _(", (df) diff-full, (e) edit"),
-                                   NULL);
+                                   (char *)NULL);
 
               if (knows_something)
                 prompt = apr_pstrcat(subpool, prompt, _(", (r) resolved"),
-                                     NULL);
+                                     (char *)NULL);
 
               if (! desc->is_binary &&
                   desc->kind != svn_wc_conflict_kind_property)
                 prompt = apr_pstrcat(subpool, prompt,
                                      _(",\n        (mc) mine-conflict, "
                                        "(tc) theirs-conflict"),
-                                     NULL);
+                                     (char *)NULL);
             }
           else
             {
               if (knows_something)
                 prompt = apr_pstrcat(subpool, prompt, _(", (r) resolved"),
-                                     NULL);
+                                     (char *)NULL);
               prompt = apr_pstrcat(subpool, prompt,
                                    _(",\n        "
                                      "(mf) mine-full, (tf) theirs-full"),
-                                   NULL);
+                                   (char *)NULL);
             }
 
-          prompt = apr_pstrcat(subpool, prompt, ",\n        ", NULL);
+          prompt = apr_pstrcat(subpool, prompt, ",\n        ", (char *)NULL);
           prompt = apr_pstrcat(subpool, prompt,
                                _("(s) show all options: "),
-                               NULL);
+                               (char *)NULL);
 
           SVN_ERR(svn_cmdline_prompt_user2(&answer, prompt, b->pb, subpool));
 

Modified: subversion/branches/py-tests-as-modules/subversion/svn/export-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/export-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/export-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/export-cmd.c Thu Nov  4 20:48:21 2010
@@ -79,10 +79,7 @@ svn_cl__export(apr_getopt_t *os,
     {
       to = APR_ARRAY_IDX(targets, 1, const char *);
 
-      /* If given the cwd, pretend we weren't given anything. */
-      if (strcmp("", to) == 0)
-        to = svn_path_uri_decode(svn_uri_basename(truefrom, pool), pool);
-      else
+      if (strcmp("", to) != 0)
         /* svn_cl__eat_peg_revisions() but only on one target */
         SVN_ERR(svn_opt__split_arg_at_peg_revision(&to, NULL, to, pool));
     }

Modified: subversion/branches/py-tests-as-modules/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/info-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/info-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/info-cmd.c Thu Nov  4 20:48:21 2010
@@ -126,6 +126,11 @@ print_info_xml(void *baton,
       /* "<wc-info>" */
       svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "wc-info", NULL);
 
+      /* "<wcroot-abspath> xx </wcroot-abspath>" */
+      if (info->wcroot_abspath)
+        svn_cl__xml_tagged_cdata(&sb, pool, "wcroot-abspath",
+                                 info->wcroot_abspath);
+
       /* "<schedule> xx </schedule>" */
       svn_cl__xml_tagged_cdata(&sb, pool, "schedule",
                                schedule_str(info->schedule));
@@ -256,6 +261,11 @@ print_info(void *baton,
     SVN_ERR(svn_cmdline_printf(pool, _("Name: %s\n"),
                                svn_dirent_basename(target, pool)));
 
+  if (info->wcroot_abspath)
+    SVN_ERR(svn_cmdline_printf(pool, _("Working Copy Root Path: %s\n"),
+                               svn_dirent_local_style(info->wcroot_abspath,
+                                                      pool)));
+
   if (info->URL)
     SVN_ERR(svn_cmdline_printf(pool, _("URL: %s\n"), info->URL));
 
@@ -539,13 +549,19 @@ svn_cl__info(apr_getopt_t *os,
       SVN_ERR(svn_opt_parse_path(&peg_revision, &truepath, target, subpool));
 
       /* If no peg-rev was attached to a URL target, then assume HEAD. */
-      if (svn_path_is_url(target))
+      if (svn_path_is_url(truepath))
         {
+          truepath = svn_uri_canonicalize(truepath, subpool);
+
           if (peg_revision.kind == svn_opt_revision_unspecified)
             peg_revision.kind = svn_opt_revision_head;
         }
       else
-        SVN_ERR(svn_dirent_get_absolute(&truepath, truepath, subpool));
+        {
+          truepath = svn_dirent_canonicalize(truepath, subpool);
+
+          SVN_ERR(svn_dirent_get_absolute(&truepath, truepath, subpool));
+        }
 
       err = svn_client_info3(truepath,
                              &peg_revision, &(opt_state->start_revision),

Modified: subversion/branches/py-tests-as-modules/subversion/svn/lock-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/lock-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/lock-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/lock-cmd.c Thu Nov  4 20:48:21 2010
@@ -89,6 +89,8 @@ svn_cl__lock(apr_getopt_t *os,
   svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
   apr_array_header_t *targets;
   const char *comment;
+  svn_boolean_t wc_present = FALSE, url_present = FALSE;
+  int i;
 
   SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
                                                       opt_state->targets,
@@ -98,6 +100,22 @@ svn_cl__lock(apr_getopt_t *os,
   if (! targets->nelts)
     return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
 
+  /* Check to see if at least one of our paths is a working copy
+   * path or a repository url. */
+  for (i = 0; i < targets->nelts; ++i)
+    {
+      const char *target = APR_ARRAY_IDX(targets, i, const char *);
+      if (! svn_path_is_url(target))
+       wc_present = TRUE;
+      else
+       url_present = TRUE;
+    }
+
+  if (url_present && wc_present)
+    return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                        _("Cannot mix repository and working copy "
+                          "targets"));
+
   /* Get comment. */
   SVN_ERR(get_comment(&comment, ctx, opt_state, pool));
 

Modified: subversion/branches/py-tests-as-modules/subversion/svn/log-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/log-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/log-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/log-cmd.c Thu Nov  4 20:48:21 2010
@@ -57,7 +57,7 @@ struct log_receiver_baton
   /* Don't print log message body nor its line count. */
   svn_boolean_t omit_log_message;
 
-  /* Whether to show diffs in the log. */
+  /* Whether to show diffs in the log. (maps to --diff) */
   svn_boolean_t show_diff;
 
   /* Diff arguments received from command line. */
@@ -163,9 +163,6 @@ log_entry_receiver(void *baton,
   const char *date;
   const char *message;
 
-  /* Number of lines in the msg. */
-  int lines;
-
   if (lb->ctx->cancel_func)
     SVN_ERR(lb->ctx->cancel_func(lb->ctx->cancel_baton));
 
@@ -201,7 +198,9 @@ log_entry_receiver(void *baton,
 
   if (message != NULL)
     {
-      lines = svn_cstring_count_newlines(message) + 1;
+      /* Number of lines in the msg. */
+      int lines = svn_cstring_count_newlines(message) + 1;
+
       SVN_ERR(svn_cmdline_printf(pool,
                                  Q_(" | %d line", " | %d lines", lines),
                                  lines));
@@ -586,25 +585,25 @@ svn_cl__log(apr_getopt_t *os,
     {
       if (opt_state->show_diff)
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                                _("'show-diff' option is not supported in "
+                                _("'diff' option is not supported in "
                                   "XML mode"));
     }
 
   if (opt_state->quiet && opt_state->show_diff)
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                            _("'quiet' and 'show-diff' options are "
+                            _("'quiet' and 'diff' options are "
                               "mutually exclusive"));
   if (opt_state->diff_cmd && (! opt_state->show_diff))
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                            _("'diff-cmd' option requires 'show-diff' "
+                            _("'diff-cmd' option requires 'diff' "
                               "option"));
   if (opt_state->internal_diff && (! opt_state->show_diff))
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                             _("'internal-diff' option requires "
-                              "'show-diff' option"));
+                              "'diff' option"));
   if (opt_state->extensions && (! opt_state->show_diff))
     return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
-                            _("'extensions' option requires 'show-diff' "
+                            _("'extensions' option requires 'diff' "
                               "option"));
 
   SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
@@ -631,9 +630,9 @@ svn_cl__log(apr_getopt_t *os,
           range = APR_ARRAY_IDX(opt_state->revision_ranges, i,
                                 svn_opt_revision_range_t *);
           if (range->start.value.number < range->end.value.number)
-            range->start = range->end;
+            range->start.value.number++;
           else
-            range->end = range->start;
+            range->end.value.number++;
         }
     }
 
@@ -661,7 +660,7 @@ svn_cl__log(apr_getopt_t *os,
   lb.omit_log_message = opt_state->quiet;
   SVN_ERR(svn_client_url_from_path2(&lb.target_url, true_path, ctx,
                                     pool, pool));
-  lb.show_diff = (! opt_state->quiet) && opt_state->show_diff;
+  lb.show_diff = opt_state->show_diff;
   lb.diff_extensions = opt_state->extensions;
   lb.merge_stack = apr_array_make(pool, 0, sizeof(svn_revnum_t));
   lb.pool = pool;

Modified: subversion/branches/py-tests-as-modules/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/main.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/main.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/main.c Thu Nov  4 20:48:21 2010
@@ -114,17 +114,19 @@ typedef enum {
   opt_show_revs,
   opt_reintegrate,
   opt_trust_server_cert,
-  opt_strip_count,
+  opt_strip,
   opt_show_copies_as_adds,
   opt_ignore_keywords,
   opt_reverse_diff,
   opt_ignore_whitespace,
-  opt_show_diff,
+  opt_diff,
   opt_internal_diff,
   opt_use_git_diff_format,
-  opt_old_patch_target_names,
+  opt_allow_mixed_revisions,
 } svn_cl__longopt_t;
 
+#define SVN_CL__OPTION_CONTINUATION_INDENT "                             "
+
 /* Option codes and descriptions for the command line client.
  *
  * The entire list must be terminated with an entry of nulls.
@@ -140,28 +142,31 @@ const apr_getopt_option_t svn_cl__option
   {"quiet",         'q', 0, N_("print nothing, or only summary information")},
   {"recursive",     'R', 0, N_("descend recursively, same as --depth=infinity")},
   {"non-recursive", 'N', 0, N_("obsolete; try --depth=files or --depth=immediates")},
-  {"change",        'c', 1, N_
-   ("the change made by revision ARG (like -r ARG-1:ARG)\n"
-    "                             If ARG is negative this is like -r ARG:ARG-1")
-  },
-  {"revision",      'r', 1, N_
-   ("ARG (some commands also take ARG1:ARG2 range)\n"
-    "                             A revision argument can be one of:\n"
-    "                                NUMBER       revision number\n"
-    "                                '{' DATE '}' revision at start of the date\n"
-    "                                'HEAD'       latest in repository\n"
-    "                                'BASE'       base rev of item's working copy\n"
-    "                                'COMMITTED'  last commit at or before BASE\n"
-    "                                'PREV'       revision just before COMMITTED")
-   /* spacing corresponds to svn_opt_format_option */
-  },
+  {"change",        'c', 1, 
+                    N_("the change made by revision ARG (like -r ARG-1:ARG)\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "If ARG is negative this is like -r ARG:ARG-1")},
+  {"revision",      'r', 1, 
+                    N_("ARG (some commands also take ARG1:ARG2 range)\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "A revision argument can be one of:\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "   NUMBER       revision number\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "   '{' DATE '}' revision at start of the date\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "   'HEAD'       latest in repository\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "   'BASE'       base rev of item's working copy\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "   'COMMITTED'  last commit at or before BASE\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "   'PREV'       revision just before COMMITTED")},
   {"file",          'F', 1, N_("read log message from file ARG")},
   {"incremental",   opt_incremental, 0,
                     N_("give output suitable for concatenation")},
   {"encoding",      opt_encoding, 1,
-                    N_("treat value as being in charset encoding ARG\n"
-                       "                             "
-                       "[alias: --enc]")},
+                    N_("treat value as being in charset encoding ARG")},
   {"version",       opt_version, 0, N_("show program version information")},
   {"verbose",       'v', 0, N_("print extra information")},
   {"show-updates",  'u', 0, N_("display update information")},
@@ -169,227 +174,171 @@ const apr_getopt_option_t svn_cl__option
   {"password",      opt_auth_password, 1, N_("specify a password ARG")},
   {"extensions",    'x', 1,
                     N_("Default: '-u'. When Subversion is invoking an\n"
-                       "                            "
-                       " external diff program, ARG is simply passed along\n"
-                       "                            "
-                       " to the program. But when Subversion is using its\n"
-                       "                            "
-                       " default internal diff implementation, or when\n"
-                       "                            "
-                       " Subversion is displaying blame annotations, ARG\n"
-                       "                            "
-                       " could be any of the following:\n"
-                       "                            "
-                       "    -u (--unified):\n"
-                       "                            "
-                       "       Output 3 lines of unified context.\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.")},
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "external diff program, ARG is simply passed along\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "to the program. But when Subversion is using its\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "default internal diff implementation, or when\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "Subversion is displaying blame annotations, ARG\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "could be any of the following:\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "   -u (--unified):\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "      Output 3 lines of unified context.\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "   -b (--ignore-space-change):\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "      Ignore changes in the amount of white space.\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "   -w (--ignore-all-space):\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "      Ignore all white space.\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "   --ignore-eol-style:\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "      Ignore changes in EOL style.\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "   -p (--show-c-function):\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "      Show C function name in diff output.")},
   {"targets",       opt_targets, 1,
                     N_("pass contents of file ARG as additional args")},
   {"depth",         opt_depth, 1,
                     N_("limit operation by depth ARG ('empty', 'files',\n"
-                       "                            "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "'immediates', or 'infinity')")},
   {"set-depth",     opt_set_depth, 1,
                     N_("set new working copy depth to ARG ('exclude',\n"
-                       "                            "
-                       "'empty', 'files', 'immediates', or 'infinity')\n"
-                       "                            "
-                       "[alias: --sd]")},
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "'empty', 'files', 'immediates', or 'infinity')")},
   {"xml",           opt_xml, 0, N_("output in XML")},
   {"strict",        opt_strict, 0, N_("use strict semantics")},
   {"stop-on-copy",  opt_stop_on_copy, 0,
-                    N_("do not cross copies while traversing history\n"
-                       "                             "
-                       "[alias: --soc]")},
+                    N_("do not cross copies while traversing history")},
   {"no-ignore",     opt_no_ignore, 0,
                     N_("disregard default and svn:ignore property ignores")},
   {"no-auth-cache", opt_no_auth_cache, 0,
-                    N_("do not cache authentication tokens\n"
-                       "                             "
-                       "[alias: --nac]")},
+                    N_("do not cache authentication tokens")},
   {"trust-server-cert", opt_trust_server_cert, 0,
                     N_("accept unknown SSL server certificates without\n"
-                       "                             "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "prompting (but only with '--non-interactive')")},
   {"non-interactive", opt_non_interactive, 0,
                     N_("do no interactive prompting")},
   {"dry-run",       opt_dry_run, 0,
-                    N_("try operation but make no changes\n"
-                       "                             "
-                       "[alias: --dry]")},
+                    N_("try operation but make no changes")},
   {"no-diff-deleted", opt_no_diff_deleted, 0,
-                    N_("do not print differences for deleted files\n"
-                       "                             "
-                       "[alias: --ndd]")},
+                    N_("do not print differences for deleted files")},
   {"notice-ancestry", opt_notice_ancestry, 0,
-                    N_("notice ancestry when calculating differences\n"
-                       "                             "
-                       "[alias: --na]")},
+                    N_("notice ancestry when calculating differences")},
   {"ignore-ancestry", opt_ignore_ancestry, 0,
-                    N_("ignore ancestry when calculating merges\n"
-                       "                             "
-                       "[alias: --ia]")},
+                    N_("ignore ancestry when calculating merges")},
   {"ignore-externals", opt_ignore_externals, 0,
-                    N_("ignore externals definitions\n"
-                       "                             "
-                       "[alias: --ie]")},
+                    N_("ignore externals definitions")},
   {"diff-cmd",      opt_diff_cmd, 1, N_("use ARG as diff command")},
   {"diff3-cmd",     opt_merge_cmd, 1, N_("use ARG as merge command")},
   {"editor-cmd",    opt_editor_cmd, 1, N_("use ARG as external editor")},
   {"record-only",   opt_record_only, 0,
-                    N_("merge only mergeinfo differences\n"
-                       "                             "
-                       "[alias: --ro]")},
+                    N_("merge only mergeinfo differences")},
   {"old",           opt_old_cmd, 1, N_("use ARG as the older target")},
   {"new",           opt_new_cmd, 1, N_("use ARG as the newer target")},
   {"revprop",       opt_revprop, 0,
                     N_("operate on a revision property (use with -r)")},
   {"relocate",      opt_relocate, 0, N_("relocate via URL-rewriting")},
   {"config-dir",    opt_config_dir, 1,
-                    N_("read user configuration files from directory ARG\n"
-                       "                             "
-                       "[alias: --cd]")},
+                    N_("read user configuration files from directory ARG")},
   {"config-option", opt_config_options, 1,
                     N_("set user configuration option in the format:\n"
-                       "                             "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "    FILE:SECTION:OPTION=[VALUE]\n"
-                       "                             "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "For example:\n"
-                       "                             "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "    servers:global:http-library=serf")},
   {"auto-props",    opt_autoprops, 0, N_("enable automatic properties")},
   {"no-auto-props", opt_no_autoprops, 0, N_("disable automatic properties")},
   {"native-eol",    opt_native_eol, 1,
                     N_("use a different EOL marker than the standard\n"
-                       "                             "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "system marker for files with the svn:eol-style\n"
-                       "                             "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "property set to 'native'.\n"
-                       "                             "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "ARG may be one of 'LF', 'CR', 'CRLF'")},
   {"limit",         'l', 1, N_("maximum number of log entries")},
-  {"no-unlock",     opt_no_unlock, 0, N_("don't unlock the targets\n"
-                       "                             "
-                       "[aliases: --nul, --keep-lock]")},
+  {"no-unlock",     opt_no_unlock, 0, N_("don't unlock the targets")},
   {"summarize",     opt_summarize, 0, N_("show a summary of the results")},
   {"remove",         opt_remove, 0, N_("remove changelist association")},
   {"changelist",    opt_changelist, 1,
-                    N_("operate only on members of changelist ARG\n"
-                       "                             "
-                       "[alias: --cl]")},
+                    N_("operate only on members of changelist ARG")},
   {"keep-changelists", opt_keep_changelists, 0,
                     N_("don't delete changelists after commit")},
-  {"keep-local",    opt_keep_local, 0, N_("keep path in working copy\n"
-                       "                             "
-                       "[alias: --kl]")},
+  {"keep-local",    opt_keep_local, 0, N_("keep path in working copy")},
   {"with-all-revprops",  opt_with_all_revprops, 0,
                     N_("retrieve all revision properties")},
   {"with-no-revprops",  opt_with_no_revprops, 0,
                     N_("retrieve no revision properties")},
   {"with-revprop",  opt_with_revprop, 1,
                     N_("set revision property ARG in new revision\n"
-                       "                             "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "using the name[=value] format")},
   {"parents",       opt_parents, 0, N_("make intermediate directories")},
   {"use-merge-history", 'g', 0,
                     N_("use/display additional information from merge\n"
-                       "                             "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "history")},
   {"accept",        opt_accept, 1,
                     N_("specify automatic conflict resolution action\n"
-                       "                            "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "('postpone', 'base', 'mine-conflict',\n"
-                       "                            "
-                       " 'theirs-conflict', 'mine-full', 'theirs-full',\n"
-                       "                            "
-                       " 'edit', 'launch')")},
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "'theirs-conflict', 'mine-full', 'theirs-full',\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "'edit', 'launch')")},
   {"show-revs",     opt_show_revs, 1,
                     N_("specify which collection of revisions to display\n"
-                       "                             "
-                       "('merged', 'eligible')\n"
-                       "                             "
-                       "[alias: --sr]")},
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "('merged', 'eligible')")},
   {"reintegrate",   opt_reintegrate, 0,
-                    N_("lump-merge all of source URL's unmerged changes\n"
-                       "                             "
-                       "[alias: --ri]")},
-  {"strip-count",   opt_strip_count, 1,
+                    N_("merge a branch back into its parent branch")},
+  {"strip",         opt_strip, 1,
                     N_("number of leading path components to strip from\n"
-                       "                             "
-                       "paths parsed from the patch file. --strip-count 0\n"
-                       "                             "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "paths parsed from the patch file. --strip 0\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "is the default and leaves paths unmodified.\n"
-                       "                             "
-                       "--strip-count 1 would change the path\n"
-                       "                             "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "--strip 1 would change the path\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "'doc/fudge/crunchy.html' to 'fudge/crunchy.html'.\n"
-                       "                             "
-                       "--strip-count 2 would leave just 'crunchy.html'\n"
-                       "                             "
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "--strip 2 would leave just 'crunchy.html'\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
                        "The expected component separator is '/' on all\n"
-                       "                             "
-                       "platforms. A leading '/' counts as one component.\n"
-                       "                             "
-                       "[alias: --strip]")},
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "platforms. A leading '/' counts as one component.")},
   {"show-copies-as-adds", opt_show_copies_as_adds, 0,
-                    N_("don't diff copied or moved files with their source\n"
-                       "                             "
-                       "[alias: --sca]")},
+                    N_("don't diff copied or moved files with their source")},
   {"ignore-keywords", opt_ignore_keywords, 0,
-                    N_("don't expand keywords\n"
-                       "                             "
-                       "[alias: --ik]")},
+                    N_("don't expand keywords")},
   {"reverse-diff", opt_reverse_diff, 0,
-                    N_("apply the unidiff in reverse\n"
-                       "                             "
-                       "This option also reverses patch target names; the\n"
-                       "                             "
-                       "--old-patch-target-names option will prevent this.\n"
-                       "                             "
-                       "[alias: --rd]")},
+                    N_("apply the unidiff in reverse")},
   {"ignore-whitespace", opt_ignore_whitespace, 0,
-                       N_("ignore whitespace during pattern matching\n"
-                       "                             "
-                       "[alias: --iw]")},
-  {"show-diff", opt_show_diff, 0,
-                       N_("produce diff output\n"
-                       "                             "
-                       "[alias: --diff]")},
+                       N_("ignore whitespace during pattern matching")},
+  {"diff", opt_diff, 0, N_("produce diff output")}, /* maps to show_diff */
   {"internal-diff", opt_internal_diff, 0,
-                       N_("override diff-cmd specified in config file\n"
-                       "                             "
-                       "[alias: --idiff]")},
+                       N_("override diff-cmd specified in config file")},
   {"git", opt_use_git_diff_format, 0,
-                       N_("use git's extended diff format\n")},
-                  
-  {"old-patch-target-names", opt_old_patch_target_names, 0,
-                       N_("use target names from the old side of a patch.\n"
-                       "                             "
-                       "If a diff header contains\n"
-                       "                             "
-                       "  --- foo.c\n"
-                       "                             "
-                       "  +++ foo.c.new\n"
-                       "                             "
-                       "this option will cause the name \"foo.c\" to be used\n"
-                       "                             "
-                       "[alias: --optn]")},
+                       N_("use git's extended diff format")},
+  {"allow-mixed-revisions", opt_allow_mixed_revisions, 0,
+                       N_("Allow merge into mixed-revision working copy.\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "Use of this option is not recommended!\n"
+                       SVN_CL__OPTION_CONTINUATION_INDENT
+                       "Please run 'svn update' instead.")},
 
   /* Long-opt Aliases
    *
@@ -413,15 +362,11 @@ const apr_getopt_option_t svn_cl__option
   {"kl",            opt_keep_local, 0, NULL},
   {"sr",            opt_show_revs, 1, NULL},
   {"ri",            opt_reintegrate, 0, NULL},
-  {"strip",         opt_strip_count, 1, NULL},
   {"sca",           opt_show_copies_as_adds, 0, NULL},
   {"ik",            opt_ignore_keywords, 0, NULL},
   {"iw",            opt_ignore_whitespace, 0, NULL},
-  {"diff",          opt_show_diff, 0, NULL},
   {"idiff",         opt_internal_diff, 0, NULL},
-  {"nul",           opt_no_unlock, 0, NULL},
-  {"keep-lock",     opt_no_unlock, 0, NULL},
-  {"optn",          opt_old_patch_target_names, 0, NULL},
+  {"keep-locks",    opt_no_unlock, 0, NULL},
 
   {0,               0, 0, 0},
 };
@@ -723,7 +668,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "    svn log http://www.example.com/repo/project@50 foo.c bar.c\n"),
     {'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_show_diff, opt_diff_cmd, opt_internal_diff, 'x'},
+     opt_diff, opt_diff_cmd, opt_internal_diff, 'x'},
     {{opt_with_revprop, N_("retrieve revision property ARG")},
      {'c', N_("the change made in revision ARG")}} },
 
@@ -780,7 +725,8 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  The --ignore-ancestry option overrides this, forcing Subversion to\n"
      "  regard the sources as unrelated and not to track the merge.\n"),
     {'r', 'c', 'N', opt_depth, 'q', opt_force, opt_dry_run, opt_merge_cmd,
-     opt_record_only, 'x', opt_ignore_ancestry, opt_accept, opt_reintegrate} },
+     opt_record_only, 'x', opt_ignore_ancestry, opt_accept, opt_reintegrate,
+     opt_allow_mixed_revisions} },
 
   { "mergeinfo", svn_cl__mergeinfo, {0}, N_
     ("Display merge-related information.\n"
@@ -870,8 +816,8 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  for addition. Use 'svn revert' to undo deletions and additions you\n"
      "  do not agree with.\n"
      ),
-    {'q', opt_dry_run, opt_strip_count, opt_reverse_diff,
-     opt_ignore_whitespace, opt_old_patch_target_names} },
+    {'q', opt_dry_run, opt_strip, opt_reverse_diff,
+     opt_ignore_whitespace} },
 
   { "propdel", svn_cl__propdel, {"pdel", "pd"}, N_
     ("Remove a property from files, dirs, or revisions.\n"
@@ -993,6 +939,29 @@ const svn_opt_subcommand_desc2_t svn_cl_
      opt_force, opt_changelist },
     {{'F', N_("read property value from file ARG")}} },
 
+  { "relocate", svn_cl__relocate, {0}, N_
+    ("Relocate the working copy to point to a different repository root URL.\n"
+     "usage: 1. relocate FROM-PREFIX TO-PREFIX [PATH...]\n"
+     "       2. relocate TO-URL [PATH]\n"
+     "\n"
+     "  Rewrite working copy URL metadata to reflect a syntactic change only.\n"
+     "  This is used when repository's root URL changes (such as a scheme\n"
+     "  or hostname change) but your working copy still reflects the same\n"
+     "  directory within the same repository.\n"
+     "\n"
+     "  1. FROM-PREFIX and TO-PREFIX are initial substrings of the working\n"
+     "     copy's current and new URLs, respectively.  (You may specify the\n"
+     "     complete old and new URLs if you wish.)  Use 'svn info' to determine\n"
+     "     the current working copy URL.\n"
+     "\n"
+     "  2. TO-URL is the (complete) new repository URL to use for for PATH.\n"
+     "\n"
+     "  Examples:\n"
+     "    svn relocate http:// svn:// project1 project2\n"
+     "    svn relocate http://www.example.com/repo/project \\\n"
+     "                 svn://svn.example.com/repo/project\n"),
+    {opt_ignore_externals} },
+
   { "resolve", svn_cl__resolve, {0}, N_
     ("Resolve conflicts on working copy files or directories.\n"
      "usage: resolve --accept=ARG [PATH...]\n"
@@ -1000,10 +969,10 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  Note:  the --accept option is currently required.\n"),
     {opt_targets, 'R', opt_depth, 'q', opt_accept},
     {{opt_accept, N_("specify automatic conflict resolution source\n"
-                             "                            "
-                             "('base', 'working', 'mine-conflict',\n"
-                             "                            "
-                             " 'theirs-conflict', 'mine-full', 'theirs-full')")}} },
+                     SVN_CL__OPTION_CONTINUATION_INDENT
+                     "('base', 'working', 'mine-conflict',\n"
+                     SVN_CL__OPTION_CONTINUATION_INDENT
+                     "'theirs-conflict', 'mine-full', 'theirs-full')")}} },
 
   { "resolved", svn_cl__resolved, {0}, N_
     ("Remove 'conflicted' state on working copy files or directories.\n"
@@ -1118,9 +1087,9 @@ const svn_opt_subcommand_desc2_t svn_cl_
       opt_ignore_externals, opt_changelist} },
 
   { "switch", svn_cl__switch, {"sw"}, N_
-    ("Update the working copy to a different URL.\n"
+    ("Update the working copy to a different URL within the same repository.\n"
      "usage: 1. switch URL[@PEGREV] [PATH]\n"
-     "       2. switch --relocate FROM TO [PATH...]\n"
+     "       2. switch --relocate FROM-PREFIX TO-PREFIX [PATH...]\n"
      "\n"
      "  1. Update the working copy to mirror a new URL within the repository.\n"
      "     This behavior is similar to 'svn update', and is the way to\n"
@@ -1142,22 +1111,15 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "     Use the --set-depth option to set a new working copy depth on the\n"
      "     targets of this operation.\n"
      "\n"
-     "  2. Rewrite working copy URL metadata to reflect a syntactic change only.\n"
-     "     This is used when repository's root URL changes (such as a scheme\n"
-     "     or hostname change) but your working copy still reflects the same\n"
-     "     directory within the same repository.\n"
-     "\n"
-     "     FROM is the root URL which will be relocated from.\n"
-     "     You can use 'svn info' to determine the root URL of the current\n"
-     "     working copy directory (look for 'URL:' in its output).\n"
-     "\n"
-     "     TO is the root URL which will be relocated to.\n"
+     "  2. The '--relocate' option is deprecated. This syntax is equivalent to\n"
+     "     'svn relocate FROM-PREFIX TO-PREFIX [PATH]'.\n"
      "\n"
      "  See also 'svn help update' for a list of possible characters\n"
      "  reporting the action taken.\n"
      "\n"
      "  Examples:\n"
      "    svn switch ^/branches/1.x-release\n"
+     "    svn switch --relocate http:// svn://\n"
      "    svn switch --relocate http://www.example.com/repo/project \\\n"
      "                          svn://svn.example.com/repo/project\n"),
     { 'r', 'N', opt_depth, opt_set_depth, 'q', opt_merge_cmd, opt_relocate,
@@ -1278,8 +1240,6 @@ main(int argc, const char *argv[])
   int i;
   const svn_opt_subcommand_desc2_t *subcommand = NULL;
   const char *dash_m_arg = NULL, *dash_F_arg = NULL;
-  const char *path_utf8;
-  apr_status_t apr_err;
   svn_cl__cmd_baton_t command_baton;
   svn_auth_baton_t *ab;
   svn_config_t *cfg_config;
@@ -1357,7 +1317,7 @@ main(int argc, const char *argv[])
       const char *utf8_opt_arg;
 
       /* Parse the next option. */
-      apr_err = apr_getopt_long(os, svn_cl__options, &opt_id, &opt_arg);
+      apr_status_t apr_err = apr_getopt_long(os, svn_cl__options, &opt_id, &opt_arg);
       if (APR_STATUS_IS_EOF(apr_err))
         break;
       else if (apr_err)
@@ -1373,11 +1333,10 @@ main(int argc, const char *argv[])
       switch (opt_id) {
       case 'l':
         {
-          char *end;
-          opt_state.limit = (int) strtol(opt_arg, &end, 10);
-          if (end == opt_arg || *end != '\0')
+          err = svn_cstring_atoi(&opt_state.limit, opt_arg);
+          if (err)
             {
-              err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+              err = svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, err,
                                      _("Non-numeric limit argument given"));
               return svn_cmdline_handle_exit_error(err, pool, "svn: ");
             }
@@ -1398,9 +1357,6 @@ main(int argc, const char *argv[])
         break;
       case 'c':
         {
-          char *end;
-          svn_revnum_t changeno;
-          svn_opt_revision_range_t *range;
           apr_array_header_t *change_revs =
             svn_cstring_split(opt_arg, ", \n\r\t\v", TRUE, pool);
 
@@ -1414,6 +1370,9 @@ main(int argc, const char *argv[])
 
           for (i = 0; i < change_revs->nelts; i++)
             {
+              char *end;
+              svn_revnum_t changeno, changeno_end;
+              svn_opt_revision_range_t *range;
               const char *change_str =
                 APR_ARRAY_IDX(change_revs, i, const char *);
 
@@ -1423,7 +1382,22 @@ main(int argc, const char *argv[])
                  ### "{DATE}" and the special words. */
               while (*change_str == 'r')
                 change_str++;
-              changeno = strtol(change_str, &end, 10);
+              changeno = changeno_end = strtol(change_str, &end, 10);
+              if (end != change_str && *end == '-')
+                {
+                  if (changeno < 0)
+                    {
+                      err = svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                              _("Negative number in range (%s)"
+                                                " not supported with -c"),
+                                              change_str);
+                      return svn_cmdline_handle_exit_error(err, pool, "svn: ");
+                    }
+                  change_str = end+1;
+                  while (*change_str == 'r')
+                    change_str++;
+                  changeno_end = strtol(change_str, &end, 10);
+                }
               if (end == change_str || *end != '\0')
                 {
                   err = svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
@@ -1441,19 +1415,28 @@ main(int argc, const char *argv[])
 
               /* Figure out the range:
                     -c N  -> -r N-1:N
-                    -c -N -> -r N:N-1 */
-              range = apr_palloc(pool, sizeof(*range));
+                    -c -N -> -r N:N-1
+                    -c M-N -> -r M-1:N for M < N
+                    -c M-N -> -r M:N-1 for M > N
+                    -c -M-N -> error (too confusing/no valid use case)
+              */
               if (changeno > 0)
                 {
-                  range->start.value.number = changeno - 1;
-                  range->end.value.number = changeno;
+                  if (changeno <= changeno_end)
+                    changeno--;
+                  else
+                    changeno_end--;
                 }
               else
                 {
                   changeno = -changeno;
-                  range->start.value.number = changeno;
-                  range->end.value.number = changeno - 1;
+                  changeno_end = changeno - 1;
                 }
+
+              range = apr_palloc(pool, sizeof(*range));
+              range->start.value.number = changeno;
+              range->end.value.number = changeno_end;
+
               opt_state.used_change_arg = TRUE;
               range->start.kind = svn_opt_revision_number;
               range->end.kind = svn_opt_revision_number;
@@ -1665,10 +1648,13 @@ main(int argc, const char *argv[])
         opt_state.new_target = apr_pstrdup(pool, opt_arg);
         break;
       case opt_config_dir:
-        err = svn_utf_cstring_to_utf8(&path_utf8, opt_arg, pool);
-        if (err)
-          return svn_cmdline_handle_exit_error(err, pool, "svn: ");
-        opt_state.config_dir = svn_dirent_internal_style(path_utf8, pool);
+        {
+          const char *path_utf8;
+          err = svn_utf_cstring_to_utf8(&path_utf8, opt_arg, pool);
+          if (err)
+            return svn_cmdline_handle_exit_error(err, pool, "svn: ");
+          opt_state.config_dir = svn_dirent_internal_style(path_utf8, pool);
+        }
         break;
       case opt_config_options:
         if (!opt_state.config_options)
@@ -1769,22 +1755,19 @@ main(int argc, const char *argv[])
       case opt_reintegrate:
         opt_state.reintegrate = TRUE;
         break;
-      case opt_strip_count:
+      case opt_strip:
         {
-          char *end;
-          opt_state.strip_count = (int) strtol(opt_arg, &end, 10);
-          if (end == opt_arg || *end != '\0')
+          err = svn_cstring_atoi(&opt_state.strip, opt_arg);
+          if (err)
             {
-              err = svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+              err = svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, err,
                                       _("Invalid strip count '%s'"), opt_arg);
               return svn_cmdline_handle_exit_error(err, pool, "svn: ");
             }
-          if (opt_state.strip_count < 0)
+          if (opt_state.strip < 0)
             {
-              err = svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL,
-                                      _("Negative strip count '%i' "
-                                        "(strip count must be positive)"),
-                                      opt_state.strip_count);
+              err = svn_error_create(SVN_ERR_INCORRECT_PARAMS, NULL,
+                                     _("Argument to --strip must be positive"));
               return svn_cmdline_handle_exit_error(err, pool, "svn: ");
             }
         }
@@ -1798,7 +1781,7 @@ main(int argc, const char *argv[])
       case opt_ignore_whitespace:
           opt_state.ignore_whitespace = TRUE;
           break;
-      case opt_show_diff:
+      case opt_diff:
           opt_state.show_diff = TRUE;
           break;
       case opt_internal_diff:
@@ -1807,8 +1790,8 @@ main(int argc, const char *argv[])
       case opt_use_git_diff_format:
         opt_state.use_git_diff_format = TRUE;
         break;
-      case opt_old_patch_target_names:
-        opt_state.old_patch_target_names = TRUE;
+      case opt_allow_mixed_revisions:
+        opt_state.allow_mixed_rev = TRUE;
         break;
       default:
         /* Hmmm. Perhaps this would be a good place to squirrel away
@@ -2087,12 +2070,24 @@ main(int argc, const char *argv[])
         }
     }
 
-  if (opt_state.relocate && (opt_state.depth != svn_depth_unknown))
+  /* Relocation is infinite-depth only. */
+  if (opt_state.relocate)
     {
-      err = svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
-                             _("--relocate and --depth are mutually "
-                               "exclusive"));
-      return svn_cmdline_handle_exit_error(err, pool, "svn: ");
+      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 svn_cmdline_handle_exit_error(err, pool, "svn: ");
+        }
+      if (! descend)
+        {
+          err = svn_error_create(
+                    SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
+                    _("--relocate and --non-recursive (-N) are mutually "
+                      "exclusive"));
+          return svn_cmdline_handle_exit_error(err, pool, "svn: ");
+        }
     }
 
   /* Only a few commands can accept a revision range; the rest can take at
@@ -2296,9 +2291,6 @@ main(int argc, const char *argv[])
                                            pool)))
     svn_handle_error2(err, stderr, TRUE, "svn: ");
 
-  /* svn can safely create instance of QApplication class. */
-  svn_auth_set_parameter(ab, "svn:auth:qapplication-safe", "1");
-
   ctx->auth_baton = ab;
 
   /* Set up conflict resolution callback. */

Modified: subversion/branches/py-tests-as-modules/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/merge-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/merge-cmd.c Thu Nov  4 20:48:21 2010
@@ -293,6 +293,10 @@ svn_cl__merge(apr_getopt_t *os,
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                                 _("--reintegrate can only be used with "
                                   "a single merge source"));
+      if (opt_state->allow_mixed_rev)
+        return svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, NULL,
+                                _("--allow-mixed-revisions cannot be used "
+                                  "with --reintegrate"));
     }
 
   if (! two_sources_specified) /* TODO: Switch order of if */
@@ -322,7 +326,7 @@ svn_cl__merge(apr_getopt_t *os,
                                            opt_state->dry_run,
                                            options, ctx, pool);
       else
-        err = svn_client_merge_peg3(sourcepath1,
+        err = svn_client_merge_peg4(sourcepath1,
                                     ranges_to_merge,
                                     &peg_revision1,
                                     targetpath,
@@ -331,6 +335,7 @@ svn_cl__merge(apr_getopt_t *os,
                                     opt_state->force,
                                     opt_state->record_only,
                                     opt_state->dry_run,
+                                    opt_state->allow_mixed_rev,
                                     options,
                                     ctx,
                                     pool);
@@ -342,7 +347,7 @@ svn_cl__merge(apr_getopt_t *os,
                                                  NULL,
                                                  _("Merge sources must both be "
                                                    "either paths or URLs")));
-      err = svn_client_merge3(sourcepath1,
+      err = svn_client_merge4(sourcepath1,
                               &first_range_start,
                               sourcepath2,
                               &first_range_end,
@@ -352,6 +357,7 @@ svn_cl__merge(apr_getopt_t *os,
                               opt_state->force,
                               opt_state->record_only,
                               opt_state->dry_run,
+                              opt_state->allow_mixed_rev,
                               options,
                               ctx,
                               pool);

Modified: subversion/branches/py-tests-as-modules/subversion/svn/move-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/move-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/move-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/move-cmd.c Thu Nov  4 20:48:21 2010
@@ -84,7 +84,7 @@ svn_cl__move(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
 
-  err = svn_client_move6(targets, dst_path, opt_state->force,
+  err = svn_client_move6(targets, dst_path,
                          TRUE, opt_state->parents, opt_state->revprop_table,
                          svn_cl__print_commit_info, NULL, ctx, pool);
 

Modified: subversion/branches/py-tests-as-modules/subversion/svn/notify.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/notify.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/notify.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/notify.c Thu Nov  4 20:48:21 2010
@@ -324,7 +324,7 @@ notify(void *baton, const svn_wc_notify_
                                            apr_pstrcat(pool, s,
                                                        "%"APR_UINT64_T_FMT
                                                        " and fuzz %d (%s)\n",
-                                                       NULL),
+                                                       (char *)NULL),
                                            n->hunk_original_start,
                                            n->hunk_original_length,
                                            n->hunk_modified_start,
@@ -341,7 +341,7 @@ notify(void *baton, const svn_wc_notify_
                                            apr_pstrcat(pool, s,
                                                        "%"APR_UINT64_T_FMT
                                                        " and fuzz %d\n",
-                                                       NULL),
+                                                       (char *)NULL),
                                            n->hunk_original_start,
                                            n->hunk_original_length,
                                            n->hunk_modified_start,
@@ -362,7 +362,7 @@ notify(void *baton, const svn_wc_notify_
                   err = svn_cmdline_printf(pool,
                                             apr_pstrcat(pool, s,
                                                         "%"APR_UINT64_T_FMT" (%s)\n",
-                                                        NULL),
+                                                        (char *)NULL),
                                             n->hunk_original_start,
                                             n->hunk_original_length,
                                             n->hunk_modified_start,
@@ -376,7 +376,7 @@ notify(void *baton, const svn_wc_notify_
                   err = svn_cmdline_printf(pool,
                                            apr_pstrcat(pool, s,
                                                        "%"APR_UINT64_T_FMT"\n",
-                                                       NULL),
+                                                       (char *)NULL),
                                            n->hunk_original_start,
                                            n->hunk_original_length,
                                            n->hunk_modified_start,

Modified: subversion/branches/py-tests-as-modules/subversion/svn/patch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/patch-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/patch-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/patch-cmd.c Thu Nov  4 20:48:21 2010
@@ -73,8 +73,7 @@ svn_cl__patch(apr_getopt_t *os,
                                   pool));
 
   SVN_ERR(svn_client_patch(abs_patch_path, abs_target_path,
-                           opt_state->dry_run, opt_state->strip_count,
-                           opt_state->old_patch_target_names,
+                           opt_state->dry_run, opt_state->strip,
                            opt_state->reverse_diff,
                            opt_state->ignore_whitespace,
                            TRUE, NULL, NULL, ctx, pool, pool));

Modified: subversion/branches/py-tests-as-modules/subversion/svn/propdel-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/propdel-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/propdel-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/propdel-cmd.c Thu Nov  4 20:48:21 2010
@@ -71,7 +71,6 @@ svn_cl__propdel(apr_getopt_t *os,
   const char *pname, *pname_utf8;
   apr_array_header_t *args, *targets;
   struct notify_wrapper_baton nwb = { 0 };
-  int i;
 
   /* Get the property's name (and a UTF-8 version of that name). */
   SVN_ERR(svn_opt_parse_num_args(&args, os, 1, pool));
@@ -121,6 +120,7 @@ svn_cl__propdel(apr_getopt_t *os,
   else  /* operate on a normal, versioned property (not a revprop) */
     {
       apr_pool_t *subpool = svn_pool_create(pool);
+      int i;
 
       if (opt_state->depth == svn_depth_unknown)
         opt_state->depth = svn_depth_empty;

Modified: subversion/branches/py-tests-as-modules/subversion/svn/propedit-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/propedit-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/propedit-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/propedit-cmd.c Thu Nov  4 20:48:21 2010
@@ -76,7 +76,6 @@ svn_cl__propedit(apr_getopt_t *os,
   svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
   const char *pname, *pname_utf8;
   apr_array_header_t *args, *targets;
-  int i;
 
   /* Validate the input and get the property's name (and a UTF-8
      version of that name). */
@@ -177,6 +176,7 @@ svn_cl__propedit(apr_getopt_t *os,
     {
       apr_pool_t *subpool = svn_pool_create(pool);
       struct commit_info_baton cib;
+      int i;
 
       /* The customary implicit dot rule has been prone to user error
        * here.  For example, Jon Trowbridge <tr...@gnu.og> did

Modified: subversion/branches/py-tests-as-modules/subversion/svn/propget-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/propget-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/propget-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/propget-cmd.c Thu Nov  4 20:48:21 2010
@@ -140,6 +140,12 @@ print_properties(svn_stream_t *out,
                                 ? _("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)));
         }
 
@@ -149,7 +155,7 @@ print_properties(svn_stream_t *out,
           apr_hash_t *hash = apr_hash_make(iterpool);
 
           apr_hash_set(hash, pname_utf8, APR_HASH_KEY_STRING, propval);
-          svn_cl__print_prop_hash(hash, FALSE, iterpool);
+          svn_cl__print_prop_hash(out, hash, FALSE, iterpool);
         }
       else
         {
@@ -184,7 +190,6 @@ svn_cl__propget(apr_getopt_t *os,
   const char *pname, *pname_utf8;
   apr_array_header_t *args, *targets;
   svn_stream_t *out;
-  int i;
 
   if (opt_state->verbose && (opt_state->revprop || opt_state->strict
                              || opt_state->xml))
@@ -267,6 +272,7 @@ svn_cl__propget(apr_getopt_t *os,
   else  /* operate on a normal, versioned property (not a revprop) */
     {
       apr_pool_t *subpool = svn_pool_create(pool);
+      int i;
 
       if (opt_state->xml)
         SVN_ERR(svn_cl__xml_print_header("properties", subpool));

Modified: subversion/branches/py-tests-as-modules/subversion/svn/proplist-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/proplist-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/proplist-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/proplist-cmd.c Thu Nov  4 20:48:21 2010
@@ -98,7 +98,8 @@ proplist_receiver(void *baton,
 
   if (!opt_state->quiet)
     SVN_ERR(svn_cmdline_printf(pool, _("Properties on '%s':\n"), name_local));
-  return svn_cl__print_prop_hash(prop_hash, (! opt_state->verbose), pool);
+  return svn_cl__print_prop_hash(NULL, prop_hash, (! opt_state->verbose),
+                                 pool);
 }
 
 
@@ -111,7 +112,6 @@ svn_cl__proplist(apr_getopt_t *os,
   svn_cl__opt_state_t *opt_state = ((svn_cl__cmd_baton_t *) baton)->opt_state;
   svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
   apr_array_header_t *targets;
-  int i;
 
   SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
                                                       opt_state->targets,
@@ -159,11 +159,12 @@ svn_cl__proplist(apr_getopt_t *os,
                                 rev));
 
           SVN_ERR(svn_cl__print_prop_hash
-                  (proplist, (! opt_state->verbose), scratch_pool));
+                  (NULL, proplist, (! opt_state->verbose), scratch_pool));
         }
     }
   else  /* operate on normal, versioned properties (not revprops) */
     {
+      int i;
       apr_pool_t *iterpool;
       svn_proplist_receiver_t pl_receiver;
 

Modified: subversion/branches/py-tests-as-modules/subversion/svn/props.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/props.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/props.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/props.c Thu Nov  4 20:48:21 2010
@@ -82,7 +82,8 @@ svn_cl__revprop_prepare(const svn_opt_re
 
 
 svn_error_t *
-svn_cl__print_prop_hash(apr_hash_t *prop_hash,
+svn_cl__print_prop_hash(svn_stream_t *out,
+                        apr_hash_t *prop_hash,
                         svn_boolean_t names_only,
                         apr_pool_t *pool)
 {
@@ -93,6 +94,7 @@ svn_cl__print_prop_hash(apr_hash_t *prop
       const char *pname = svn__apr_hash_index_key(hi);
       svn_string_t *propval = svn__apr_hash_index_val(hi);
       const char *pname_stdout;
+      apr_size_t len;
 
       if (svn_prop_needs_translation(pname))
         SVN_ERR(svn_subst_detranslate_string(&propval, propval,
@@ -100,18 +102,45 @@ svn_cl__print_prop_hash(apr_hash_t *prop
 
       SVN_ERR(svn_cmdline_cstring_from_utf8(&pname_stdout, pname, pool));
 
-      /* ### We leave these printfs for now, since if propval wasn't translated
-       * above, we don't know anything about its encoding.  In fact, it
-       * might be binary data... */
-      printf("  %s\n", pname_stdout);
+      if (out)
+        {
+          pname_stdout = apr_psprintf(pool, "  %s\n", pname_stdout); 
+          SVN_ERR(svn_subst_translate_cstring2(pname_stdout, &pname_stdout,
+                                              APR_EOL_STR,  /* 'native' eol */
+                                              FALSE, /* no repair */
+                                              NULL,  /* no keywords */
+                                              FALSE, /* no expansion */
+                                              pool));
+
+          len = strlen(pname_stdout);
+          SVN_ERR(svn_stream_write(out, pname_stdout, &len));
+        }
+      else
+        {
+          /* ### We leave these printfs for now, since if propval wasn't
+             translated above, we don't know anything about its encoding.
+             In fact, it might be binary data... */
+          printf("  %s\n", pname_stdout);
+        }
+
       if (!names_only)
         {
           /* Add an extra newline to the value before indenting, so that
            * every line of output has the indentation whether the value
            * already ended in a newline or not. */
           const char *newval = apr_psprintf(pool, "%s\n", propval->data);
-
-          printf("%s", svn_cl__indent_string(newval, "    ", pool));
+          const char *indented_newval = svn_cl__indent_string(newval,
+                                                              "    ",
+                                                              pool);
+          if (out)
+            {
+              len = strlen(indented_newval);
+              SVN_ERR(svn_stream_write(out, indented_newval, &len));
+            }
+          else
+            {
+              printf("%s", indented_newval);
+            }
         }
     }
 

Modified: subversion/branches/py-tests-as-modules/subversion/svn/propset-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/propset-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/propset-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/propset-cmd.c Thu Nov  4 20:48:21 2010
@@ -55,7 +55,6 @@ svn_cl__propset(apr_getopt_t *os,
   svn_string_t *propval = NULL;
   svn_boolean_t propval_came_from_cmdline;
   apr_array_header_t *args, *targets;
-  int i;
 
   /* PNAME and PROPVAL expected as first 2 arguments if filedata was
      NULL, else PNAME alone will precede the targets.  Get a UTF-8
@@ -131,6 +130,7 @@ svn_cl__propset(apr_getopt_t *os,
   else  /* operate on a normal, versioned property (not a revprop) */
     {
       apr_pool_t *iterpool;
+      int i;
 
       if (opt_state->depth == svn_depth_unknown)
         opt_state->depth = svn_depth_empty;

Modified: subversion/branches/py-tests-as-modules/subversion/svn/resolve-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/resolve-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/resolve-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/resolve-cmd.c Thu Nov  4 20:48:21 2010
@@ -29,6 +29,7 @@
 #define APR_WANT_STDIO
 #include <apr_want.h>
 
+#include "svn_path.h"
 #include "svn_client.h"
 #include "svn_error.h"
 #include "svn_pools.h"
@@ -93,6 +94,19 @@ svn_cl__resolve(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, scratch_pool));
 
+  /* Don't even attempt to modify the working copy if any of the
+   * targets look like URLs. URLs are invalid input. */
+  for (i = 0; i < targets->nelts; i++)
+    {
+      const char *target = APR_ARRAY_IDX(targets, i, const char *);
+
+      if (svn_path_is_url(target))
+        return svn_error_return(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR,
+                                                  NULL,
+                                                  _("'%s' is not a local path"),
+                                                  target));
+    }
+  
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i < targets->nelts; i++)
     {

Modified: subversion/branches/py-tests-as-modules/subversion/svn/resolved-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/resolved-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/resolved-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/resolved-cmd.c Thu Nov  4 20:48:21 2010
@@ -29,6 +29,7 @@
 #define APR_WANT_STDIO
 #include <apr_want.h>
 
+#include "svn_path.h"
 #include "svn_client.h"
 #include "svn_error.h"
 #include "svn_pools.h"
@@ -64,6 +65,18 @@ svn_cl__resolved(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, scratch_pool));
 
+  /* URLs are invalid input. */
+  for (i = 0; i < targets->nelts; i++)
+    {
+      const char *target = APR_ARRAY_IDX(targets, i, const char *);
+
+      if (svn_path_is_url(target))
+        return svn_error_return(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR,
+                                                  NULL,
+                                                  _("'%s' is not a local path"),
+                                                  target));
+    }
+  
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i < targets->nelts; i++)
     {

Modified: subversion/branches/py-tests-as-modules/subversion/svn/revert-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/revert-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/revert-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/revert-cmd.c Thu Nov  4 20:48:21 2010
@@ -27,6 +27,7 @@
 
 /*** Includes. ***/
 
+#include "svn_path.h"
 #include "svn_client.h"
 #include "svn_error_codes.h"
 #include "svn_error.h"
@@ -47,6 +48,7 @@ svn_cl__revert(apr_getopt_t *os,
   svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
   apr_array_header_t *targets = NULL;
   svn_error_t *err;
+  int i;
 
   SVN_ERR(svn_cl__args_to_target_array_print_reserved(&targets, os,
                                                       opt_state->targets,
@@ -63,9 +65,21 @@ svn_cl__revert(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, scratch_pool));
 
+  /* Don't even attempt to modify the working copy if any of the
+   * targets look like URLs. URLs are invalid input. */
+  for (i = 0; i < targets->nelts; i++)
+    {
+      const char *target = APR_ARRAY_IDX(targets, i, const char *);
+
+      if (svn_path_is_url(target))
+        return svn_error_return(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR,
+                                                  NULL,
+                                                  _("'%s' is not a local path"),
+                                                  target));
+    }
+
   err = svn_client_revert2(targets, opt_state->depth,
                            opt_state->changelists, ctx, scratch_pool);
-
   if (err
       && (err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH)
       && (! SVN_DEPTH_IS_RECURSIVE(opt_state->depth)))

Modified: subversion/branches/py-tests-as-modules/subversion/svn/schema/info.rnc
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/schema/info.rnc?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/schema/info.rnc (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/schema/info.rnc Thu Nov  4 20:48:21 2010
@@ -53,6 +53,7 @@ uuid = element uuid { uuid.type }
 ## Info in the working copy entry.
 wc-info =
   element wc-info {
+    wcroot-abspath?,
     schedule?,
     changelist?,
     copy-from-url?,
@@ -63,6 +64,8 @@ wc-info =
     checksum?
   }
 
+wcroot-abspath = element wcroot-abspath { string }
+
 schedule =
   element schedule { "normal" | "add" | "delete" | "replace" | "none" }
 

Modified: subversion/branches/py-tests-as-modules/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/status-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/status-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/status-cmd.c Thu Nov  4 20:48:21 2010
@@ -171,14 +171,7 @@ print_status(void *baton,
              apr_pool_t *pool)
 {
   struct status_baton *sb = baton;
-
-  svn_revnum_t revision;
-  svn_revnum_t changed_rev;
-  apr_time_t changed_date;
-  const char *changed_author;
-  const char *local_abspath;
-
-  local_abspath = status->local_abspath;
+  const char *local_abspath = status->local_abspath;
 
   /* ### The revision information with associates are based on what
    * ### _read_info() returns. The svn_wc_status_func4_t callback is
@@ -194,16 +187,13 @@ print_status(void *baton,
                  = svn_client_status_dup(status, sb->cl_pool);
 
       /* Retrieve some data from the original version of the replaced node */
-      SVN_ERR(svn_wc__node_get_working_rev_info(&revision, &changed_rev,
-                                                &changed_date,
-                                                &changed_author,
+      SVN_ERR(svn_wc__node_get_working_rev_info(&tweaked_status->revision,
+                                                &tweaked_status->changed_rev,
+                                                &tweaked_status->changed_date,
+                                                &tweaked_status->changed_author,
                                                 sb->ctx->wc_ctx,
                                                 local_abspath, sb->cl_pool,
                                                 pool));
-      tweaked_status->revision = revision;
-      tweaked_status->changed_rev = changed_rev;
-      tweaked_status->changed_date = changed_date;
-      tweaked_status->changed_author = changed_author;
 
       status = tweaked_status;
     }
@@ -259,6 +249,18 @@ svn_cl__status(apr_getopt_t *os,
   /* Add "." if user passed 0 arguments */
   svn_opt_push_implicit_dot_target(targets, scratch_pool);
 
+  /* URLs are invalid input. */
+  for (i = 0; i < targets->nelts; i++)
+    {
+      const char *target = APR_ARRAY_IDX(targets, i, const char *);
+
+      if (svn_path_is_url(target))
+        return svn_error_return(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR,
+                                                  NULL,
+                                                  _("'%s' is not a local path"),
+                                                  target));
+    }
+
   /* We want our -u statuses to be against HEAD. */
   rev.kind = svn_opt_revision_head;
 

Modified: subversion/branches/py-tests-as-modules/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/status.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/status.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/status.c Thu Nov  4 20:48:21 2010
@@ -163,6 +163,7 @@ print_status(const char *path,
           svn_wc_conflict_description_t *old_tree_conflict;
           SVN_ERR(svn_wc__get_tree_conflict(&tree_conflict, ctx->wc_ctx,
                                             local_abspath, pool, pool));
+          SVN_ERR_ASSERT(tree_conflict != NULL);
           old_tree_conflict = svn_wc__cd2_to_cd(tree_conflict, pool);
 
           tree_status_code = 'C';

Modified: subversion/branches/py-tests-as-modules/subversion/svn/switch-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/switch-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/switch-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/switch-cmd.c Thu Nov  4 20:48:21 2010
@@ -41,14 +41,13 @@
 
 static svn_error_t *
 rewrite_urls(const apr_array_header_t *targets,
-             svn_boolean_t recurse,
+             svn_boolean_t ignore_externals,
              svn_client_ctx_t *ctx,
              apr_pool_t *pool)
 {
   apr_pool_t *subpool;
   const char *from;
   const char *to;
-  int i;
 
   if (targets->nelts < 2)
     return svn_error_create(SVN_ERR_CL_INSUFFICIENT_ARGS, 0, NULL);
@@ -67,16 +66,19 @@ rewrite_urls(const apr_array_header_t *t
 
   if (targets->nelts == 2)
     {
-      SVN_ERR(svn_client_relocate("", from, to, recurse, ctx, pool));
+      SVN_ERR(svn_client_relocate2("", from, to, ignore_externals,
+                                   ctx, pool));
     }
   else
     {
+      int i;
+
       for (i = 2; i < targets->nelts; i++)
         {
           const char *target = APR_ARRAY_IDX(targets, i, const char *);
           svn_pool_clear(subpool);
-          SVN_ERR(svn_client_relocate(target, from, to, recurse,
-                                      ctx, subpool));
+          SVN_ERR(svn_client_relocate2(target, from, to,
+                                       ignore_externals, ctx, subpool));
         }
     }
 
@@ -109,8 +111,7 @@ svn_cl__switch(apr_getopt_t *os,
 
   /* handle only-rewrite case specially */
   if (opt_state->relocate)
-    return rewrite_urls(targets,
-                        SVN_DEPTH_IS_RECURSIVE(opt_state->depth),
+    return rewrite_urls(targets, opt_state->ignore_externals,
                         ctx, scratch_pool);
 
   if (targets->nelts < 1)

Modified: subversion/branches/py-tests-as-modules/subversion/svn/upgrade-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/upgrade-cmd.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/upgrade-cmd.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/upgrade-cmd.c Thu Nov  4 20:48:21 2010
@@ -31,6 +31,7 @@
 #include "svn_client.h"
 #include "svn_error_codes.h"
 #include "svn_error.h"
+#include "svn_path.h"
 #include "cl.h"
 #include "svn_private_config.h"
 
@@ -59,6 +60,19 @@ svn_cl__upgrade(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, scratch_pool));
 
+  /* Don't even attempt to modify the working copy if any of the
+   * targets look like URLs. URLs are invalid input. */
+  for (i = 0; i < targets->nelts; i++)
+    {
+      const char *target = APR_ARRAY_IDX(targets, i, const char *);
+
+      if (svn_path_is_url(target))
+        return svn_error_return(svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR,
+                                                  NULL,
+                                                  _("'%s' is not a local path"),
+                                                  target));
+    }
+
   iterpool = svn_pool_create(scratch_pool);
   for (i = 0; i < targets->nelts; i++)
     {

Modified: subversion/branches/py-tests-as-modules/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svn/util.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svn/util.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svn/util.c Thu Nov  4 20:48:21 2010
@@ -826,14 +826,14 @@ svn_cl__get_log_message(const char **log
              white space as we will consider white space only as empty */
           apr_size_t len;
 
-          for (len = message->len - 1; len >= 0; len--)
+          for (len = 0; len < message->len; len++)
             {
               /* FIXME: should really use an UTF-8 whitespace test
                  rather than svn_ctype_isspace, which is ASCII only */
               if (! svn_ctype_isspace(message->data[len]))
                 break;
             }
-          if (len < 0)
+          if (len == message->len)
             message = NULL;
         }
 
@@ -906,9 +906,6 @@ svn_cl__may_need_force(svn_error_t *err)
 svn_error_t *
 svn_cl__error_checked_fputs(const char *string, FILE* stream)
 {
-  /* This function is equal to svn_cmdline_fputs() minus
-     the utf8->local encoding translation */
-
   /* On POSIX systems, errno will be set on an error in fputs, but this might
      not be the case on other platforms.  We reset errno and only
      use it if it was set by the below fputs call.  Else, we just return

Modified: subversion/branches/py-tests-as-modules/subversion/svndumpfilter/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svndumpfilter/main.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svndumpfilter/main.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svndumpfilter/main.c Thu Nov  4 20:48:21 2010
@@ -702,7 +702,6 @@ adjust_mergeinfo(svn_string_t **final_va
       const char *merge_source = svn__apr_hash_index_key(hi);
       apr_array_header_t *rangelist = svn__apr_hash_index_val(hi);
       struct parse_baton_t *pb = rb->pb;
-      int i;
 
       /* Determine whether the merge_source is a part of the prefix. */
       if (skip_path(merge_source, pb->prefixes, pb->do_exclude, pb->glob))
@@ -719,6 +718,8 @@ adjust_mergeinfo(svn_string_t **final_va
       /* Possibly renumber revisions in merge source's rangelist. */
       if (pb->do_renumber_revs)
         {
+          int i;
+
           for (i = 0; i < rangelist->nelts; i++)
             {
               struct revmap_t *revmap_start;

Modified: subversion/branches/py-tests-as-modules/subversion/svnlook/main.c
URL: http://svn.apache.org/viewvc/subversion/branches/py-tests-as-modules/subversion/svnlook/main.c?rev=1031230&r1=1031229&r2=1031230&view=diff
==============================================================================
--- subversion/branches/py-tests-as-modules/subversion/svnlook/main.c (original)
+++ subversion/branches/py-tests-as-modules/subversion/svnlook/main.c Thu Nov  4 20:48:21 2010
@@ -1186,7 +1186,6 @@ print_tree(svn_fs_root_t *root,
            apr_pool_t *pool)
 {
   apr_pool_t *subpool;
-  int i;
   apr_hash_t *entries;
   apr_hash_index_t *hi;
   const char* name;
@@ -1195,8 +1194,11 @@ print_tree(svn_fs_root_t *root,
 
   /* Print the indentation. */
   if (!full_paths)
-    for (i = 0; i < indentation; i++)
-      SVN_ERR(svn_cmdline_fputs(" ", stdout, pool));
+    {
+      int i;
+      for (i = 0; i < indentation; i++)
+        SVN_ERR(svn_cmdline_fputs(" ", stdout, pool));
+    }
 
   /* ### The path format is inconsistent.. needs fix */
   if (full_paths)
@@ -1204,7 +1206,7 @@ print_tree(svn_fs_root_t *root,
   else if (*path == '/')
     name = svn_uri_basename(path, pool);
   else
-    name = svn_relpath_basename(path, pool);
+    name = svn_relpath_basename(path, NULL);
 
   if (svn_path_is_empty(name))
     name = "/"; /* basename of '/' is "" */