subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1672070 - /subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
Date Wed, 08 Apr 2015 12:04:45 GMT
Author: julianfoad
Date: Wed Apr  8 12:04:45 2015
New Revision: 1672070

URL: http://svn.apache.org/r1672070
Log:
On the 'move-tracking-2' branch: Allow the 'svnmover put' command to
take an absolute path for the local file argument.

* subversion/svnmover/svnmover.c
  (execute): Don't try to convert the local-file arg to an element reference.
  (parse_actions): Don't require the local-file arg to be a relpath.

Modified:
    subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c

Modified: subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c?rev=1672070&r1=1672069&r2=1672070&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c (original)
+++ subversion/branches/move-tracking-2/subversion/svnmover/svnmover.c Wed Apr  8 12:04:45
2015
@@ -1510,9 +1510,13 @@ execute(const apr_array_header_t *action
       /* Before translating paths to/from elements, need a sequence point */
       svn_editor3_sequence_point(editor);
 
+      /* Convert each ACTION[j].{relpath, rev_spec} to
+         (EL_REV[j], PARENT_EL_REV[j], PATH_NAME[j], REVNUM[j]),
+         except for the local-path argument of a 'put' command. */
       for (j = 0; j < 3; j++)
         {
-          if (action->relpath[j])
+          if (action->relpath[j]
+              && ! (action->action == ACTION_PUT_FILE && j == 0))
             {
               const char *rrpath, *parent_rrpath;
 
@@ -2090,7 +2094,10 @@ parse_actions(apr_array_header_t **actio
                                        "Argument '%s' is a URL; use "
                                        "--root-url (-U) instead", path);
             }
-          if (! svn_relpath_is_canonical(path))
+          /* These args must be relpaths, except for the 'local file' arg
+             of a 'put' command. */
+          if (! svn_relpath_is_canonical(path)
+              && ! (action->action == ACTION_PUT_FILE && k == 0))
             {
               return svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL,
                                        "Argument '%s' is not a relative path "



Mime
View raw message