Modified: subversion/branches/verify-keep-going/subversion/svn/add-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/add-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/add-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/add-cmd.c Wed Nov 27 
11:52:35 2013
@@ -83,7 +83,7 @@ svn_cl__add(apr_getopt_t *os,
                errors, opt_state->quiet,
                SVN_ERR_ENTRY_EXISTS,
                SVN_ERR_WC_PATH_NOT_FOUND,
-               SVN_NO_ERROR));
+               0));
     }
 
   svn_pool_destroy(iterpool);

Modified: subversion/branches/verify-keep-going/subversion/svn/blame-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/blame-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/blame-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/blame-cmd.c Wed Nov 27 
11:52:35 2013
@@ -74,7 +74,7 @@ blame_receiver_xml(void *baton,
                         "line-number",
                         apr_psprintf(pool, "%" APR_INT64_T_FMT,
                                      line_no + 1),
-                        NULL);
+                        SVN_VA_NULL);
 
   if (SVN_IS_VALID_REVNUM(revision))
     svn_cl__print_xml_commit(&sb, revision,
@@ -88,7 +88,7 @@ blame_receiver_xml(void *baton,
     {
       /* "<merged>" */
       svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "merged",
-                            "path", merged_path, NULL);
+                            "path", merged_path, SVN_VA_NULL);
 
       svn_cl__print_xml_commit(&sb, merged_revision,
                              svn_prop_get_value(merged_rev_props,
@@ -350,7 +350,7 @@ svn_cl__blame(apr_getopt_t *os,
           if (! svn_path_is_url(target))
             outpath = svn_dirent_local_style(truepath, subpool);
           svn_xml_make_open_tag(&bl.sbuf, pool, svn_xml_normal, "target",
-                                "path", outpath, NULL);
+                                "path", outpath, SVN_VA_NULL);
 
           receiver = blame_receiver_xml;
         }

Modified: subversion/branches/verify-keep-going/subversion/svn/cat-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/cat-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/cat-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/cat-cmd.c Wed Nov 27 
11:52:35 2013
@@ -84,7 +84,7 @@ svn_cl__cat(apr_getopt_t *os,
                            SVN_ERR_ENTRY_NOT_FOUND,
                            SVN_ERR_CLIENT_IS_DIRECTORY,
                            SVN_ERR_FS_NOT_FOUND,
-                           SVN_NO_ERROR));
+                           0));
     }
   svn_pool_destroy(subpool);
 

Modified: subversion/branches/verify-keep-going/subversion/svn/changelist-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/changelist-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/changelist-cmd.c 
(original)
+++ subversion/branches/verify-keep-going/subversion/svn/changelist-cmd.c Wed 
Nov 27 11:52:35 2013
@@ -106,7 +106,7 @@ svn_cl__changelist(apr_getopt_t *os,
                errors, opt_state->quiet,
                SVN_ERR_UNVERSIONED_RESOURCE,
                SVN_ERR_WC_PATH_NOT_FOUND,
-               SVN_NO_ERROR));
+               0));
     }
   else
     {
@@ -117,7 +117,7 @@ svn_cl__changelist(apr_getopt_t *os,
                errors, opt_state->quiet,
                SVN_ERR_UNVERSIONED_RESOURCE,
                SVN_ERR_WC_PATH_NOT_FOUND,
-               SVN_NO_ERROR));
+               0));
     }
 
   if (errors->nelts > 0)

Modified: subversion/branches/verify-keep-going/subversion/svn/cl-conflicts.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/cl-conflicts.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/cl-conflicts.c 
(original)
+++ subversion/branches/verify-keep-going/subversion/svn/cl-conflicts.c Wed Nov 
27 11:52:35 2013
@@ -21,6 +21,7 @@
  * ====================================================================
  */
 
+#include "svn_private_config.h"
 #include "cl-conflicts.h"
 #include "svn_hash.h"
 #include "svn_xml.h"
@@ -30,9 +31,6 @@
 
 #include "cl.h"
 
-#include "svn_private_config.h"
-
-
 /* A map for svn_wc_conflict_action_t values to XML strings */
 static const svn_token_map_t map_conflict_action_xml[] =
 {

Modified: subversion/branches/verify-keep-going/subversion/svn/cl.h
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/cl.h?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/cl.h (original)
+++ subversion/branches/verify-keep-going/subversion/svn/cl.h Wed Nov 27 
11:52:35 2013
@@ -223,6 +223,7 @@ typedef struct svn_cl__opt_state_t
                                     (not converted to UTF-8) */
   svn_boolean_t parents;         /* create intermediate directories */
   svn_boolean_t use_merge_history; /* use/display extra merge information */
+  svn_boolean_t auto_moves;      /* interpret unique DEL/ADD pairs as moves */
   svn_cl__accept_t accept_which;   /* how to handle conflicts */
   svn_cl__show_revs_t show_revs;   /* mergeinfo flavor */
   svn_depth_t set_depth;           /* new sticky ambient depth value */
@@ -242,6 +243,7 @@ typedef struct svn_cl__opt_state_t
   svn_boolean_t mergeinfo_log;     /* show log message in mergeinfo command */
   svn_boolean_t remove_unversioned;/* remove unversioned items */
   svn_boolean_t remove_ignored;    /* remove ignored items */
+  svn_boolean_t no_newline;        /* do not output the trailing newline */
 } svn_cl__opt_state_t;
 
 
@@ -289,7 +291,8 @@ svn_opt_subcommand_t
   svn_cl__switch,
   svn_cl__unlock,
   svn_cl__update,
-  svn_cl__upgrade;
+  svn_cl__upgrade,
+  svn_cl__youngest;
 
 
 /* See definition in svn.c for documentation. */
@@ -317,7 +320,7 @@ extern const apr_getopt_option_t svn_cl_
  *
  * Typically, error codes like SVN_ERR_UNVERSIONED_RESOURCE,
  * SVN_ERR_ENTRY_NOT_FOUND, etc, are supplied in varargs.  Don't
- * forget to terminate the argument list with SVN_NO_ERROR.
+ * forget to terminate the argument list with 0 (or APR_SUCCESS).
  */
 svn_error_t *
 svn_cl__try(svn_error_t *err,
@@ -439,12 +442,12 @@ svn_cl__time_cstring_to_human_cstring(co
    Increment *TEXT_CONFLICTS, *PROP_CONFLICTS, or *TREE_CONFLICTS if
    a conflict was encountered.
 
-   Use CWD_ABSPATH -- the absolute path of the current working
-   directory -- to shorten PATH into something relative to that
-   directory as necessary.
+   Use TARGET_ABSPATH and TARGET_PATH to shorten PATH into something
+   relative to the target as necessary.
 */
 svn_error_t *
-svn_cl__print_status(const char *cwd_abspath,
+svn_cl__print_status(const char *target_abspath,
+                     const char *target_path,
                      const char *path,
                      const svn_client_status_t *status,
                      svn_boolean_t suppress_externals_placeholders,
@@ -462,12 +465,12 @@ svn_cl__print_status(const char *cwd_abs
 /* Print STATUS for PATH in XML to stdout.  Use POOL for temporary
    allocations.
 
-   Use CWD_ABSPATH -- the absolute path of the current working
-   directory -- to shorten PATH into something relative to that
-   directory as necessary.
+   Use TARGET_ABSPATH and TARGET_PATH to shorten PATH into something
+   relative to the target as necessary.
  */
 svn_error_t *
-svn_cl__print_status_xml(const char *cwd_abspath,
+svn_cl__print_status_xml(const char *target_abspath,
+                         const char *target_path,
                          const char *path,
                          const svn_client_status_t *status,
                          svn_client_ctx_t *ctx,

Modified: subversion/branches/verify-keep-going/subversion/svn/commit-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/commit-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/commit-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/commit-cmd.c Wed Nov 
27 11:52:35 2013
@@ -29,6 +29,7 @@
 
 #include <apr_general.h>
 
+#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_error.h"
 #include "svn_error_codes.h"
@@ -40,8 +41,6 @@
 #include "svn_config.h"
 #include "cl.h"
 
-#include "svn_private_config.h"
-
 
 
 /* Wrapper notify_func2 function and baton for warning about

Modified: 
subversion/branches/verify-keep-going/subversion/svn/conflict-callbacks.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/conflict-callbacks.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/conflict-callbacks.c 
(original)
+++ subversion/branches/verify-keep-going/subversion/svn/conflict-callbacks.c 
Wed Nov 27 11:52:35 2013
@@ -27,6 +27,7 @@
 #define APR_WANT_STRFUNC
 #include <apr_want.h>
 
+#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_client.h"
@@ -41,8 +42,6 @@
 
 #include "private/svn_cmdline_private.h"
 
-#include "svn_private_config.h"
-
 #define ARRAY_LEN(ary) ((sizeof (ary)) / (sizeof ((ary)[0])))
 
 
@@ -400,31 +399,11 @@ launch_resolver(svn_boolean_t *performed
                 svn_cl__interactive_conflict_baton_t *b,
                 apr_pool_t *pool)
 {
-  svn_error_t *err;
-
-  err = svn_cl__merge_file_externally(desc->base_abspath, desc->their_abspath,
-                                      desc->my_abspath, desc->merged_file,
-                                      desc->local_abspath, b->config, NULL,
-                                      pool);
-  if (err && err->apr_err == SVN_ERR_CL_NO_EXTERNAL_MERGE_TOOL)
-    {
-      SVN_ERR(svn_cmdline_fprintf(stderr, pool, "%s\n",
-                                  err->message ? err->message :
-                                  _("No merge tool found, "
-                                    "try '(m) merge' instead.\n")));
-      svn_error_clear(err);
-    }
-  else if (err && err->apr_err == SVN_ERR_EXTERNAL_PROGRAM)
-    {
-      SVN_ERR(svn_cmdline_fprintf(stderr, pool, "%s\n",
-                                  err->message ? err->message :
-                             _("Error running merge tool, "
-                               "try '(m) merge' instead.")));
-      svn_error_clear(err);
-    }
-  else if (err)
-    return svn_error_trace(err);
-  else if (performed_edit)
+  SVN_ERR(svn_cl__merge_file_externally(desc->base_abspath, 
desc->their_abspath,
+                                        desc->my_abspath, desc->merged_file,
+                                        desc->local_abspath, b->config, NULL,
+                                        pool));
+  if (performed_edit)
     *performed_edit = TRUE;
 
   return SVN_NO_ERROR;
@@ -475,8 +454,8 @@ static const resolver_option_t text_conf
                                      "(same)  [theirs-full]"),
                                   svn_wc_conflict_choose_theirs_full },
   { "",   "",                     "", svn_wc_conflict_choose_unspecified },
-  { "m",  N_("merge"),            N_("use internal merge tool to resolve "
-                                     "conflict"), -1 },
+  { "m",  N_("merge"),            N_("use merge tool to resolve conflict"),
+                                     -1 },
   { "l",  N_("launch tool"),      N_("launch external tool to resolve "
                                      "conflict  [launch]"), -1 },
   { "p",  N_("postpone"),         N_("mark the conflict to be resolved later"
@@ -620,21 +599,21 @@ prompt_string(const resolver_option_t *o
         }
 
       if (! first)
-        result = apr_pstrcat(pool, result, ",", (char *)NULL);
+        result = apr_pstrcat(pool, result, ",", SVN_VA_NULL);
       s = apr_psprintf(pool, _(" (%s) %s"),
                        opt->code, _(opt->short_desc));
       slen = svn_utf_cstring_utf8_width(s);
       /* Break the line if adding the next option would make it too long */
       if (this_line_len + slen > MAX_PROMPT_WIDTH)
         {
-          result = apr_pstrcat(pool, result, line_sep, (char *)NULL);
+          result = apr_pstrcat(pool, result, line_sep, SVN_VA_NULL);
           this_line_len = left_margin;
         }
-      result = apr_pstrcat(pool, result, s, (char *)NULL);
+      result = apr_pstrcat(pool, result, s, SVN_VA_NULL);
       this_line_len += slen;
       first = FALSE;
     }
-  return apr_pstrcat(pool, result, ": ", (char *)NULL);
+  return apr_pstrcat(pool, result, ": ", SVN_VA_NULL);
 }
 
 /* Return a help string listing the OPTIONS. */
@@ -657,13 +636,13 @@ help_string(const resolver_option_t *opt
         }
       else
         {
-          result = apr_pstrcat(pool, result, "\n", (char *)NULL);
+          result = apr_pstrcat(pool, result, "\n", SVN_VA_NULL);
         }
     }
   result = apr_pstrcat(pool, result,
                        _("Words in square brackets are the corresponding "
                          "--accept option arguments.\n"),
-                       (char *)NULL);
+                       SVN_VA_NULL);
   return result;
 }
 
@@ -836,20 +815,35 @@ handle_text_conflict(svn_wc_conflict_res
       else if (strcmp(opt->code, "m") == 0 || strcmp(opt->code, ":-g") == 0 ||
                strcmp(opt->code, "=>-") == 0 || strcmp(opt->code, ":>.") == 0)
         {
-          if (desc->kind != svn_wc_conflict_kind_text)
+          svn_boolean_t remains_in_conflict;
+          svn_error_t *err;
+
+          err = launch_resolver(&performed_edit, desc, b, iterpool);
+          if (err)
             {
-              SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
-                                          _("Invalid option; can only "
-                                            "resolve text conflicts with "
-                                            "the internal merge tool."
-                                            "\n\n")));
-              continue;
+              if (err->apr_err == SVN_ERR_CL_NO_EXTERNAL_MERGE_TOOL ||
+                  err->apr_err == SVN_ERR_EXTERNAL_PROGRAM)
+                {
+                  /* Try the internal merge tool. */
+                  svn_error_clear(err);
+                }
+              else
+                return svn_error_trace(err);
             }
 
-          if (desc->base_abspath && desc->their_abspath &&
+          if (!performed_edit &&
+              desc->base_abspath && desc->their_abspath &&
               desc->my_abspath && desc->merged_file)
             {
-              svn_boolean_t remains_in_conflict;
+              if (desc->kind != svn_wc_conflict_kind_text)
+                {
+                  SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
+                                              _("Invalid option; can only "
+                                                "resolve text conflicts with "
+                                                "the internal merge tool."
+                                                "\n\n")));
+                  continue;
+                }
 
               SVN_ERR(svn_cl__merge_file(desc->base_abspath,
                                          desc->their_abspath,
@@ -861,11 +855,13 @@ handle_text_conflict(svn_wc_conflict_res
                                          b->config,
                                          &remains_in_conflict,
                                          iterpool));
-              knows_something = !remains_in_conflict;
             }
           else
             SVN_ERR(svn_cmdline_fprintf(stderr, iterpool,
                                         _("Invalid option.\n\n")));
+
+          if (performed_edit || !remains_in_conflict)
+            knows_something = TRUE;
         }
       else if (strcmp(opt->code, "l") == 0 || strcmp(opt->code, ":-l") == 0)
         {
@@ -876,7 +872,28 @@ handle_text_conflict(svn_wc_conflict_res
           if (desc->base_abspath && desc->their_abspath &&
               desc->my_abspath && desc->merged_file)
             {
-              SVN_ERR(launch_resolver(&performed_edit, desc, b, iterpool));
+              svn_error_t *err;
+
+              err = launch_resolver(&performed_edit, desc, b, iterpool);
+              if (err && err->apr_err == SVN_ERR_CL_NO_EXTERNAL_MERGE_TOOL)
+                {
+                  SVN_ERR(svn_cmdline_fprintf(stderr, iterpool, "%s\n",
+                                              err->message ? err->message :
+                                              _("No merge tool found, "
+                                                "try '(m) merge' 
instead.\n")));
+                  svn_error_clear(err);
+                }
+              else if (err && err->apr_err == SVN_ERR_EXTERNAL_PROGRAM)
+                {
+                  SVN_ERR(svn_cmdline_fprintf(stderr, iterpool, "%s\n",
+                                              err->message ? err->message :
+                                         _("Error running merge tool, "
+                                           "try '(m) merge' instead.")));
+                  svn_error_clear(err);
+                }
+              else if (err)
+                return svn_error_trace(err);
+
               if (performed_edit)
                 knows_something = TRUE;
             }

Modified: subversion/branches/verify-keep-going/subversion/svn/diff-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/diff-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/diff-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/diff-cmd.c Wed Nov 27 
11:52:35 2013
@@ -27,6 +27,7 @@
 
 /*** Includes. ***/
 
+#include "svn_private_config.h"
 #include "svn_pools.h"
 #include "svn_client.h"
 #include "svn_string.h"
@@ -40,8 +41,6 @@
 #include "svn_hash.h"
 #include "cl.h"
 
-#include "svn_private_config.h"
-
 
 /*** Code. ***/
 
@@ -118,7 +117,7 @@ summarize_xml(const svn_client_diff_summ
                         "kind", svn_cl__node_kind_str_xml(summary->node_kind),
                         "item", kind_to_word(summary->summarize_kind),
                         "props", summary->prop_changed ? "modified" : "none",
-                        NULL);
+                        SVN_VA_NULL);
 
   svn_xml_escape_cdata_cstring(&sb, path, pool);
   svn_xml_make_close_tag(&sb, pool, "path");
@@ -213,7 +212,7 @@ svn_cl__diff(apr_getopt_t *os,
       SVN_ERR(svn_cl__xml_print_header("diff", pool));
 
       sb = svn_stringbuf_create_empty(pool);
-      svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "paths", NULL);
+      svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "paths", SVN_VA_NULL);
       SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
     }
 

Modified: subversion/branches/verify-keep-going/subversion/svn/help-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/help-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/help-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/help-cmd.c Wed Nov 27 
11:52:35 2013
@@ -27,15 +27,13 @@
 
 /*** Includes. ***/
 
+#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_string.h"
 #include "svn_config.h"
 #include "svn_error.h"
-#include "svn_version.h"
 #include "cl.h"
 
-#include "svn_private_config.h"
-
 
 /*** Code. ***/
 
@@ -48,10 +46,9 @@ svn_cl__help(apr_getopt_t *os,
   svn_cl__opt_state_t *opt_state = NULL;
   svn_stringbuf_t *version_footer = NULL;
 
-  /* xgettext: the %s is for SVN_VER_NUMBER. */
-  char help_header_template[] =
+  char help_header[] =
   N_("usage: svn <subcommand> [options] [args]\n"
-     "Subversion command-line client, version %s.\n"
+     "Subversion command-line client.\n"
      "Type 'svn help <subcommand>' for help on a specific subcommand.\n"
      "Type 'svn --version' to see the program version and RA modules\n"
      "  or 'svn --version --quiet' to see just the version number.\n"
@@ -66,9 +63,6 @@ svn_cl__help(apr_getopt_t *os,
   N_("Subversion is a tool for version control.\n"
      "For additional information, see http://subversion.apache.org/\n";);
 
-  char *help_header =
-    apr_psprintf(pool, _(help_header_template), SVN_VER_NUMBER);
-
   const char *ra_desc_start
     = _("The following repository access (RA) modules are available:\n\n");
 

Modified: subversion/branches/verify-keep-going/subversion/svn/info-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/info-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/info-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/info-cmd.c Wed Nov 27 
11:52:35 2013
@@ -100,7 +100,7 @@ print_info_xml(void *baton,
                                   path_prefix, target, pool),
                         "kind", svn_cl__node_kind_str_xml(info->kind),
                         "revision", rev_str,
-                        NULL);
+                        SVN_VA_NULL);
 
   /* "<url> xx </url>" */
   svn_cl__xml_tagged_cdata(&sb, pool, "url", info->URL);
@@ -115,13 +115,14 @@ print_info_xml(void *baton,
                                                    info->repos_root_URL,
                                                    info->URL, pool),
                                                pool),
-                                           NULL));
+                                           SVN_VA_NULL));
     }
 
   if (info->repos_root_URL || info->repos_UUID)
     {
       /* "<repository>" */
-      svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "repository", NULL);
+      svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "repository",
+                            SVN_VA_NULL);
 
       /* "<root> xx </root>" */
       svn_cl__xml_tagged_cdata(&sb, pool, "root", info->repos_root_URL);
@@ -136,7 +137,8 @@ print_info_xml(void *baton,
   if (info->wc_info)
     {
       /* "<wc-info>" */
-      svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "wc-info", NULL);
+      svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "wc-info",
+                            SVN_VA_NULL);
 
       /* "<wcroot-abspath> xx </wcroot-abspath>" */
       if (info->wc_info->wcroot_abspath)

Modified: subversion/branches/verify-keep-going/subversion/svn/list-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/list-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/list-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/list-cmd.c Wed Nov 27 
11:52:35 2013
@@ -213,7 +213,7 @@ print_dirent_xml(void *baton,
           svn_xml_make_open_tag(&sb, scratch_pool, svn_xml_normal, "external",
                                 "parent_url", external_parent_url,
                                 "target", external_target,
-                                NULL);
+                                SVN_VA_NULL);
 
           pb->last_external_parent_url = external_parent_url;
           pb->last_external_target = external_target;
@@ -223,7 +223,7 @@ print_dirent_xml(void *baton,
 
   svn_xml_make_open_tag(&sb, scratch_pool, svn_xml_normal, "entry",
                         "kind", svn_cl__node_kind_str_xml(dirent->kind),
-                        NULL);
+                        SVN_VA_NULL);
 
   svn_cl__xml_tagged_cdata(&sb, scratch_pool, "name", entryname);
 
@@ -237,7 +237,7 @@ print_dirent_xml(void *baton,
   svn_xml_make_open_tag(&sb, scratch_pool, svn_xml_normal, "commit",
                         "revision",
                         apr_psprintf(scratch_pool, "%ld", dirent->created_rev),
-                        NULL);
+                        SVN_VA_NULL);
   svn_cl__xml_tagged_cdata(&sb, scratch_pool, "author", dirent->last_author);
   if (dirent->time)
     svn_cl__xml_tagged_cdata(&sb, scratch_pool, "date",
@@ -246,7 +246,8 @@ print_dirent_xml(void *baton,
 
   if (lock)
     {
-      svn_xml_make_open_tag(&sb, scratch_pool, svn_xml_normal, "lock", NULL);
+      svn_xml_make_open_tag(&sb, scratch_pool, svn_xml_normal, "lock",
+                            SVN_VA_NULL);
       svn_cl__xml_tagged_cdata(&sb, scratch_pool, "token", lock->token);
       svn_cl__xml_tagged_cdata(&sb, scratch_pool, "owner", lock->owner);
       svn_cl__xml_tagged_cdata(&sb, scratch_pool, "comment", lock->comment);
@@ -359,7 +360,7 @@ svn_cl__list(apr_getopt_t *os,
           svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
           svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "list",
                                 "path", truepath[0] == '\0' ? "." : truepath,
-                                NULL);
+                                SVN_VA_NULL);
           SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout));
         }
 

Modified: subversion/branches/verify-keep-going/subversion/svn/log-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/log-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/log-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/log-cmd.c Wed Nov 27 
11:52:35 2013
@@ -566,7 +566,7 @@ log_entry_receiver_xml(void *baton,
   revstr = apr_psprintf(pool, "%ld", log_entry->revision);
   /* <logentry revision="xxx"> */
   svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "logentry",
-                        "revision", revstr, NULL);
+                        "revision", revstr, SVN_VA_NULL);
 
   /* <author>xxx</author> */
   svn_cl__xml_tagged_cdata(&sb, pool, "author", author);
@@ -587,7 +587,7 @@ log_entry_receiver_xml(void *baton,
 
       /* <paths> */
       svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "paths",
-                            NULL);
+                            SVN_VA_NULL);
 
       /* Get an array of sorted hash keys. */
       sorted_paths = svn_sort__hash(log_entry->changed_paths2,
@@ -619,7 +619,7 @@ log_entry_receiver_xml(void *baton,
                                                      log_item->text_modified),
                                     "prop-mods", svn_tristate__to_word(
                                                      log_item->props_modified),
-                                    NULL);
+                                    SVN_VA_NULL);
             }
           else
             {
@@ -632,7 +632,7 @@ log_entry_receiver_xml(void *baton,
                                                      log_item->text_modified),
                                     "prop-mods", svn_tristate__to_word(
                                                      log_item->props_modified),
-                                    NULL);
+                                    SVN_VA_NULL);
             }
           /* xxx</path> */
           svn_xml_escape_cdata_cstring(&sb, path, pool);
@@ -652,7 +652,7 @@ log_entry_receiver_xml(void *baton,
   svn_compat_log_revprops_clear(log_entry->revprops);
   if (log_entry->revprops && apr_hash_count(log_entry->revprops) > 0)
     {
-      svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops", NULL);
+      svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "revprops", 
SVN_VA_NULL);
       SVN_ERR(svn_cmdline__print_xml_prop_hash(&sb, log_entry->revprops,
                                                FALSE, /* name_only */
                                                FALSE, pool));
@@ -681,6 +681,9 @@ svn_cl__log(apr_getopt_t *os,
   const char *target;
   int i;
   apr_array_header_t *revprops;
+  svn_move_behavior_t move_behavior = opt_state->auto_moves
+                                    ? svn_move_behavior_auto_moves
+                                    : svn_move_behavior_explicit_moves;
 
   if (!opt_state->xml)
     {
@@ -831,13 +834,14 @@ svn_cl__log(apr_getopt_t *os,
           if (!opt_state->quiet)
             APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_LOG;
         }
-      SVN_ERR(svn_client_log5(targets,
+      SVN_ERR(svn_client_log6(targets,
                               &lb.target_peg_revision,
                               opt_state->revision_ranges,
                               opt_state->limit,
                               opt_state->verbose,
                               opt_state->stop_on_copy,
                               opt_state->use_merge_history,
+                              move_behavior,
                               revprops,
                               log_entry_receiver_xml,
                               &lb,
@@ -854,13 +858,14 @@ svn_cl__log(apr_getopt_t *os,
       APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_DATE;
       if (!opt_state->quiet)
         APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_LOG;
-      SVN_ERR(svn_client_log5(targets,
+      SVN_ERR(svn_client_log6(targets,
                               &lb.target_peg_revision,
                               opt_state->revision_ranges,
                               opt_state->limit,
                               opt_state->verbose,
                               opt_state->stop_on_copy,
                               opt_state->use_merge_history,
+                              move_behavior,
                               revprops,
                               log_entry_receiver,
                               &lb,

Modified: subversion/branches/verify-keep-going/subversion/svn/mergeinfo-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/mergeinfo-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/mergeinfo-cmd.c 
(original)
+++ subversion/branches/verify-keep-going/subversion/svn/mergeinfo-cmd.c Wed 
Nov 27 11:52:35 2013
@@ -275,7 +275,8 @@ mergeinfo_summary(
 
   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);
+                     || target_revision->kind == svn_opt_revision_working 
+                     || target_revision->kind == svn_opt_revision_base);
   SVN_ERR(svn_client_get_merging_summary(
             &is_reintegration,
             &yca_url, &yca_rev,

Modified: subversion/branches/verify-keep-going/subversion/svn/notify.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/notify.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/notify.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/notify.c Wed Nov 27 
11:52:35 2013
@@ -31,6 +31,7 @@
 #define APR_WANT_STRFUNC
 #include <apr_want.h>
 
+#include "svn_private_config.h"
 #include "svn_cmdline.h"
 #include "svn_pools.h"
 #include "svn_dirent_uri.h"
@@ -41,8 +42,6 @@
 #include "private/svn_subr_private.h"
 #include "private/svn_dep_compat.h"
 
-#include "svn_private_config.h"
-
 
 /* Baton for notify and friends. */
 struct notify_baton
@@ -486,7 +485,7 @@ notify(void *baton, const svn_wc_notify_
                                            apr_pstrcat(pool, s,
                                                        "%"APR_UINT64_T_FMT
                                                        " and fuzz %lu (%s)\n",
-                                                       (char *)NULL),
+                                                       SVN_VA_NULL),
                                            n->hunk_original_start,
                                            n->hunk_original_length,
                                            n->hunk_modified_start,
@@ -503,7 +502,7 @@ notify(void *baton, const svn_wc_notify_
                                            apr_pstrcat(pool, s,
                                                        "%"APR_UINT64_T_FMT
                                                        " and fuzz %lu\n",
-                                                       (char *)NULL),
+                                                       SVN_VA_NULL),
                                            n->hunk_original_start,
                                            n->hunk_original_length,
                                            n->hunk_modified_start,
@@ -524,7 +523,7 @@ notify(void *baton, const svn_wc_notify_
                   err = svn_cmdline_printf(pool,
                                             apr_pstrcat(pool, s,
                                                         "%"APR_UINT64_T_FMT" 
(%s)\n",
-                                                        (char *)NULL),
+                                                        SVN_VA_NULL),
                                             n->hunk_original_start,
                                             n->hunk_original_length,
                                             n->hunk_modified_start,
@@ -538,7 +537,7 @@ notify(void *baton, const svn_wc_notify_
                   err = svn_cmdline_printf(pool,
                                            apr_pstrcat(pool, s,
                                                        "%"APR_UINT64_T_FMT"\n",
-                                                       (char *)NULL),
+                                                       SVN_VA_NULL),
                                            n->hunk_original_start,
                                            n->hunk_original_length,
                                            n->hunk_modified_start,

Modified: subversion/branches/verify-keep-going/subversion/svn/propedit-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/propedit-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/propedit-cmd.c 
(original)
+++ subversion/branches/verify-keep-going/subversion/svn/propedit-cmd.c Wed Nov 
27 11:52:35 2013
@@ -27,6 +27,7 @@
 
 /*** Includes. ***/
 
+#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_wc.h"
@@ -41,7 +42,6 @@
 #include "cl.h"
 
 #include "private/svn_cmdline_private.h"
-#include "svn_private_config.h"
 
 
 /*** Code. ***/

Modified: subversion/branches/verify-keep-going/subversion/svn/propget-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/propget-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/propget-cmd.c 
(original)
+++ subversion/branches/verify-keep-going/subversion/svn/propget-cmd.c Wed Nov 
27 11:52:35 2013
@@ -27,6 +27,7 @@
 
 /*** Includes. ***/
 
+#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_pools.h"
@@ -45,8 +46,6 @@
 
 #include "private/svn_cmdline_private.h"
 
-#include "svn_private_config.h"
-
 
 /*** Code. ***/
 
@@ -100,7 +99,7 @@ print_properties_xml(const char *pname,
             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);
+                            "path", name_local, SVN_VA_NULL);
 
           svn_cmdline__print_xml_prop(&sb, pname, propval, TRUE, iterpool);
           svn_xml_make_close_tag(&sb, iterpool, "target");
@@ -123,7 +122,7 @@ print_properties_xml(const char *pname,
       svn_pool_clear(iterpool);
 
       svn_xml_make_open_tag(&sb, iterpool, svn_xml_normal, "target",
-                        "path", filename, NULL);
+                        "path", filename, SVN_VA_NULL);
       svn_cmdline__print_xml_prop(&sb, pname, propval, FALSE, iterpool);
       svn_xml_make_close_tag(&sb, iterpool, "target");
 
@@ -376,7 +375,7 @@ svn_cl__propget(apr_getopt_t *os,
 
               svn_xml_make_open_tag(&sb, pool, svn_xml_normal,
                                     "revprops",
-                                    "rev", revstr, NULL);
+                                    "rev", revstr, SVN_VA_NULL);
 
               svn_cmdline__print_xml_prop(&sb, pname_utf8, propval, FALSE,
                                           pool);

Modified: subversion/branches/verify-keep-going/subversion/svn/proplist-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/proplist-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/proplist-cmd.c 
(original)
+++ subversion/branches/verify-keep-going/subversion/svn/proplist-cmd.c Wed Nov 
27 11:52:35 2013
@@ -83,7 +83,7 @@ proplist_receiver_xml(void *baton,
             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);
+                            "path", name_local, SVN_VA_NULL);
           SVN_ERR(svn_cmdline__print_xml_prop_hash(&sb, iprop->prop_hash,
                                                    (! opt_state->verbose),
                                                    TRUE, iterpool));
@@ -105,7 +105,7 @@ proplist_receiver_xml(void *baton,
     {
       /* "<target ...>" */
         svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "target",
-                              "path", name_local, NULL);
+                              "path", name_local, SVN_VA_NULL);
 
         SVN_ERR(svn_cmdline__print_xml_prop_hash(&sb, prop_hash,
                                                  (! opt_state->verbose),
@@ -230,7 +230,7 @@ svn_cl__proplist(apr_getopt_t *os,
 
           svn_xml_make_open_tag(&sb, scratch_pool, svn_xml_normal,
                                 "revprops",
-                                "rev", revstr, NULL);
+                                "rev", revstr, SVN_VA_NULL);
           SVN_ERR(svn_cmdline__print_xml_prop_hash(&sb, proplist,
                                                    (! opt_state->verbose),
                                                    FALSE, scratch_pool));
@@ -299,7 +299,7 @@ svn_cl__proplist(apr_getopt_t *os,
                    errors, opt_state->quiet,
                    SVN_ERR_UNVERSIONED_RESOURCE,
                    SVN_ERR_ENTRY_NOT_FOUND,
-                   SVN_NO_ERROR));
+                   0));
         }
       svn_pool_destroy(iterpool);
 

Modified: subversion/branches/verify-keep-going/subversion/svn/props.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/props.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/props.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/props.c Wed Nov 27 
11:52:35 2013
@@ -30,6 +30,8 @@
 #include <stdlib.h>
 
 #include <apr_hash.h>
+
+#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_string.h"
@@ -46,7 +48,6 @@
 #include "private/svn_string_private.h"
 #include "private/svn_cmdline_private.h"
 
-#include "svn_private_config.h"
 
 
 svn_error_t *

Modified: subversion/branches/verify-keep-going/subversion/svn/status-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/status-cmd.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/status-cmd.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/status-cmd.c Wed Nov 
27 11:52:35 2013
@@ -27,6 +27,7 @@
 
 /*** Includes. ***/
 
+#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_string.h"
 #include "svn_wc.h"
@@ -40,7 +41,6 @@
 #include "svn_cmdline.h"
 #include "cl.h"
 
-#include "svn_private_config.h"
 #include "private/svn_wc_private.h"
 
 
@@ -51,7 +51,8 @@ struct status_baton
 {
   /* These fields all correspond to the ones in the
      svn_cl__print_status() interface. */
-  const char *cwd_abspath;
+  const char *target_abspath;
+  const char *target_path;
   svn_boolean_t suppress_externals_placeholders;
   svn_boolean_t detailed;
   svn_boolean_t show_last_committed;
@@ -77,6 +78,8 @@ struct status_baton
 struct status_cache
 {
   const char *path;
+  const char *target_abspath;
+  const char *target_path;
   svn_client_status_t *status;
 };
 
@@ -112,7 +115,7 @@ print_start_target_xml(const char *targe
   svn_stringbuf_t *sb = svn_stringbuf_create_empty(pool);
 
   svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "target",
-                        "path", target, NULL);
+                        "path", target, SVN_VA_NULL);
 
   return svn_cl__error_checked_fputs(sb->data, stdout);
 }
@@ -132,7 +135,7 @@ print_finish_target_xml(svn_revnum_t rep
       const char *repos_rev_str;
       repos_rev_str = apr_psprintf(pool, "%ld", repos_rev);
       svn_xml_make_open_tag(&sb, pool, svn_xml_self_closing, "against",
-                            "revision", repos_rev_str, NULL);
+                            "revision", repos_rev_str, SVN_VA_NULL);
     }
 
   svn_xml_make_close_tag(&sb, pool, "target");
@@ -152,10 +155,11 @@ print_status_normal_or_xml(void *baton,
   struct status_baton *sb = baton;
 
   if (sb->xml_mode)
-    return svn_cl__print_status_xml(sb->cwd_abspath, path, status,
-                                    sb->ctx, pool);
+    return svn_cl__print_status_xml(sb->target_abspath, sb->target_path,
+                                    path, status, sb->ctx, pool);
   else
-    return svn_cl__print_status(sb->cwd_abspath, path, status,
+    return svn_cl__print_status(sb->target_abspath, sb->target_path,
+                                path, status,
                                 sb->suppress_externals_placeholders,
                                 sb->detailed,
                                 sb->show_last_committed,
@@ -239,6 +243,8 @@ print_status(void *baton,
       const char *cl_key = apr_pstrdup(sb->cl_pool, status->changelist);
       struct status_cache *scache = apr_pcalloc(sb->cl_pool, sizeof(*scache));
       scache->path = apr_pstrdup(sb->cl_pool, path);
+      scache->target_abspath = apr_pstrdup(sb->cl_pool, sb->target_abspath);
+      scache->target_path = apr_pstrdup(sb->cl_pool, sb->target_path);
       scache->status = svn_client_status_dup(status, sb->cl_pool);
 
       path_array =
@@ -303,7 +309,6 @@ svn_cl__status(apr_getopt_t *os,
                                   "mode"));
     }
 
-  SVN_ERR(svn_dirent_get_absolute(&(sb.cwd_abspath), "", scratch_pool));
   sb.suppress_externals_placeholders = (opt_state->quiet
                                         && (! opt_state->verbose));
   sb.detailed = (opt_state->verbose || opt_state->update);
@@ -328,6 +333,10 @@ svn_cl__status(apr_getopt_t *os,
 
       svn_pool_clear(iterpool);
 
+      SVN_ERR(svn_dirent_get_absolute(&(sb.target_abspath), target,
+                                      scratch_pool));
+      sb.target_path = target;
+
       SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
 
       if (opt_state->xml)
@@ -349,7 +358,8 @@ svn_cl__status(apr_getopt_t *os,
                           NULL, opt_state->quiet,
                           /* not versioned: */
                           SVN_ERR_WC_NOT_WORKING_COPY,
-                          SVN_ERR_WC_PATH_NOT_FOUND));
+                          SVN_ERR_WC_PATH_NOT_FOUND,
+                          0));
 
       if (opt_state->xml)
         SVN_ERR(print_finish_target_xml(repos_rev, iterpool));
@@ -380,7 +390,7 @@ svn_cl__status(apr_getopt_t *os,
               svn_stringbuf_setempty(buf);
               svn_xml_make_open_tag(&buf, scratch_pool, svn_xml_normal,
                                     "changelist", "name", changelist_name,
-                                    NULL);
+                                    SVN_VA_NULL);
               SVN_ERR(svn_cl__error_checked_fputs(buf->data, stdout));
             }
           else
@@ -392,6 +402,8 @@ svn_cl__status(apr_getopt_t *os,
             {
               struct status_cache *scache =
                 APR_ARRAY_IDX(path_array, j, struct status_cache *);
+              sb.target_abspath = scache->target_abspath;
+              sb.target_path = scache->target_path;
               SVN_ERR(print_status_normal_or_xml(&sb, scache->path,
                                                  scache->status, 
scratch_pool));
             }

Modified: subversion/branches/verify-keep-going/subversion/svn/status.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svn/status.c?rev=1546002&r1=1546001&r2=1546002&view=diff
==============================================================================
--- subversion/branches/verify-keep-going/subversion/svn/status.c (original)
+++ subversion/branches/verify-keep-going/subversion/svn/status.c Wed Nov 27 
11:52:35 2013
@@ -26,6 +26,8 @@
 
 
 /*** Includes. ***/
+
+#include "svn_private_config.h"
 #include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_wc.h"
@@ -33,7 +35,6 @@
 #include "svn_xml.h"
 #include "svn_time.h"
 #include "cl.h"
-#include "svn_private_config.h"
 #include "cl-conflicts.h"
 #include "private/svn_wc_private.h"
 
@@ -137,69 +138,84 @@ generate_status_desc(enum svn_wc_status_
 }
 
 /* Make a relative path containing '..' elements as needed.
-   RELATIVE_TO_PATH must be the path to a directory (not a file!) and
-   TARGET_PATH must be the path to any file or directory. Both
-   RELATIVE_TO_PATH and TARGET_PATH must be based on the same parent path,
-   i.e. they can either both be absolute or they can both be relative to the
-   same parent directory. Both paths are expected to be canonical.
+   TARGET_ABSPATH shall be the absolute version of TARGET_PATH.
+   TARGET_ABSPATH, TARGET_PATH and PATH shall be canonical.
 
-   If above conditions are met, a relative path that leads to TARGET_ABSPATH
-   from RELATIVE_TO_PATH is returned, but there is no error checking involved.
+   If above conditions are met, a relative path that leads to PATH
+   from TARGET_PATH is returned, but there is no error checking involved.
 
-   The returned path is allocated from RESULT_POOL, all other allocations are
-   made in SCRATCH_POOL. */
+   The returned path is allocated from RESULT_POOL, all other
+   allocations are made in SCRATCH_POOL.  */
 static const char *
-make_relpath(const char *relative_to_path,
+make_relpath(const char *target_abspath,
              const char *target_path,
+             const char *path,
              apr_pool_t *result_pool,
              apr_pool_t *scratch_pool)
 {
   const char *la;
   const char *parent_dir_els = "";
+  const char *abspath, *relative;
+  svn_error_t *err = svn_dirent_get_absolute(&abspath, path, scratch_pool);
+
+  if (err)
+    {
+      /* We probably got passed some invalid path. */
+      svn_error_clear(err);
+      return apr_pstrdup(result_pool, path);
+    }
+
+  relative = svn_dirent_skip_ancestor(target_abspath, abspath);
+  if (relative)
+    {
+      return svn_dirent_join(target_path, relative, result_pool);
+    }
 
   /* An example:
    *  relative_to_path = /a/b/c
-   *  target_path      = /a/x/y/z
+   *  path             = /a/x/y/z
    *  result           = ../../x/y/z
    *
    * Another example (Windows specific):
    *  relative_to_path = F:/wc
-   *  target_path      = C:/wc
+   *  path             = C:/wc
    *  result           = C:/wc
    */
 
   /* Skip the common ancestor of both paths, here '/a'. */
-  la = svn_dirent_get_longest_ancestor(relative_to_path, target_path,
+  la = svn_dirent_get_longest_ancestor(target_abspath, abspath,
                                        scratch_pool);
   if (*la == '\0')
     {
       /* Nothing in common: E.g. C:/ vs F:/ on Windows */
-      return apr_pstrdup(result_pool, target_path);
+      return apr_pstrdup(result_pool, path);
     }
-  relative_to_path = svn_dirent_skip_ancestor(la, relative_to_path);
-  target_path = svn_dirent_skip_ancestor(la, target_path);
+  relative = svn_dirent_skip_ancestor(la, target_abspath);
+  path = svn_dirent_skip_ancestor(la, path);
 
   /* In above example, we'd now have:
    *  relative_to_path = b/c
-   *  target_path      = x/y/z */
+   *  path             = x/y/z */
 
   /* Count the elements of relative_to_path and prepend as many '..' elements
-   * to target_path. */
-  while (*relative_to_path)
+   * to path. */
+  while (*relative)
     {
-      svn_dirent_split(&relative_to_path, NULL, relative_to_path,
+      svn_dirent_split(&relative, NULL, relative,
                        scratch_pool);
       parent_dir_els = svn_dirent_join(parent_dir_els, "..", scratch_pool);
     }
 
-  return svn_dirent_join(parent_dir_els, target_path, result_pool);
+  return svn_dirent_join(parent_dir_els, path, result_pool);
 }
 
 
 /* Print STATUS and PATH in a format determined by DETAILED and
    SHOW_LAST_COMMITTED. */
 static svn_error_t *
-print_status(const char *cwd_abspath, const char *path,
+print_status(const char *target_abspath,
+             const char *target_path,
+             const char *path,
              svn_boolean_t detailed,
              svn_boolean_t show_last_committed,
              svn_boolean_t repos_locks,
@@ -217,7 +233,7 @@ print_status(const char *cwd_abspath, co
   const char *moved_from_line = "";
   const char *moved_to_line = "";
 
-  path = make_relpath(cwd_abspath, path, pool, pool);
+  path = make_relpath(target_abspath, target_path, path, pool, pool);
 
   /* For historic reasons svn ignores the property status for added nodes, even
      if these nodes were copied and have local property changes.
@@ -295,14 +311,15 @@ print_status(const char *cwd_abspath, co
     {
       const char *relpath;
 
-      relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+      relpath = make_relpath(target_abspath, target_path,
+                             status->moved_from_abspath,
                              pool, pool);
       relpath = svn_dirent_local_style(relpath, pool);
       moved_from_line = apr_pstrcat(pool, "\n        > ",
                                     apr_psprintf(pool,
                                                  _("swapped places with %s"),
                                                  relpath),
-                                    (char *)NULL);
+                                    SVN_VA_NULL);
     }
   else if (status->moved_from_abspath || status->moved_to_abspath)
     {
@@ -310,27 +327,31 @@ print_status(const char *cwd_abspath, co
 
       if (status->moved_from_abspath)
         {
-          relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+          relpath = make_relpath(target_abspath, target_path,
+                                 status->moved_from_abspath,
                                  pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
           moved_from_line = apr_pstrcat(pool, "\n        > ",
                                         apr_psprintf(pool, _("moved from %s"),
                                                      relpath),
-                                        (char *)NULL);
+                                        SVN_VA_NULL);
         }
 
       if (status->moved_to_abspath)
         {
-          relpath = make_relpath(cwd_abspath, status->moved_to_abspath,
+          relpath = make_relpath(target_abspath, target_path,
+                                 status->moved_to_abspath,
                                  pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
           moved_to_line = apr_pstrcat(pool, "\n        > ",
                                       apr_psprintf(pool, _("moved to %s"),
                                                    relpath),
-                                      (char *)NULL);
+                                      SVN_VA_NULL);
         }
     }
 
+  path = svn_dirent_local_style(path, pool);
+
   if (detailed)
     {
       char ood_status, lock_status;
@@ -448,7 +469,8 @@ print_status(const char *cwd_abspath, co
 
 
 svn_error_t *
-svn_cl__print_status_xml(const char *cwd_abspath,
+svn_cl__print_status_xml(const char *target_abspath,
+                         const char *target_path,
                          const char *path,
                          const svn_client_status_t *status,
                          svn_client_ctx_t *ctx,
@@ -467,10 +489,11 @@ svn_cl__print_status_xml(const char *cwd
     SVN_ERR(svn_wc_conflicted_p3(NULL, NULL, &tree_conflicted,
                                  ctx->wc_ctx, local_abspath, pool));
 
-  path = make_relpath(cwd_abspath, path, pool, pool);
+  path = make_relpath(target_abspath, target_path, path, pool, pool);
 
   svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "entry",
-                        "path", svn_dirent_local_style(path, pool), NULL);
+                        "path", svn_dirent_local_style(path, pool),
+                        SVN_VA_NULL);
 
   att_hash = apr_hash_make(pool);
   svn_hash_sets(att_hash, "item",
@@ -500,14 +523,16 @@ svn_cl__print_status_xml(const char *cwd
 
       if (status->moved_from_abspath)
         {
-          relpath = make_relpath(cwd_abspath, status->moved_from_abspath,
+          relpath = make_relpath(target_abspath, target_path,
+                                 status->moved_from_abspath,
                                  pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
           svn_hash_sets(att_hash, "moved-from", relpath);
         }
       if (status->moved_to_abspath)
         {
-          relpath = make_relpath(cwd_abspath, status->moved_to_abspath,
+          relpath = make_relpath(target_abspath, target_path,
+                                 status->moved_to_abspath,
                                  pool, pool);
           relpath = svn_dirent_local_style(relpath, pool);
           svn_hash_sets(att_hash, "moved-to", relpath);
@@ -538,7 +563,7 @@ svn_cl__print_status_xml(const char *cwd
                             
generate_status_desc(combined_repos_status(status)),
                             "props",
                             generate_status_desc(status->repos_prop_status),
-                            NULL);
+                            SVN_VA_NULL);
       if (status->repos_lock)
         svn_cl__print_xml_lock(&sb, status->repos_lock, pool);
 
@@ -552,7 +577,8 @@ svn_cl__print_status_xml(const char *cwd
 
 /* Called by status-cmd.c */
 svn_error_t *
-svn_cl__print_status(const char *cwd_abspath,
+svn_cl__print_status(const char *target_abspath,
+                     const char *target_path,
                      const char *path,
                      const svn_client_status_t *status,
                      svn_boolean_t suppress_externals_placeholders,
@@ -601,7 +627,7 @@ svn_cl__print_status(const char *cwd_abs
         return SVN_NO_ERROR;
     }
 
-  return print_status(cwd_abspath, svn_dirent_local_style(path, pool),
+  return print_status(target_abspath, target_path, path,
                       detailed, show_last_committed, repos_locks, status,
                       text_conflicts, prop_conflicts, tree_conflicts,
                       ctx, pool);


Reply via email to