You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2014/10/29 11:07:58 UTC

svn commit: r1635085 - /subversion/trunk/subversion/svn/export-cmd.c

Author: julianfoad
Date: Wed Oct 29 10:07:57 2014
New Revision: 1635085

URL: http://svn.apache.org/r1635085
Log:
Like other commands where a peg revision is not meaningful, make 'svn
export' error out if there is any non-empty peg specifier on the target
path, rather than just ignoring it.

This fixes one more case that was missed in r1196005 and r1196050. Related
to issue #3416 <http://subversion.tigris.org/issues/show_bug.cgi?id=3416>
"Cannot add or commit 'dir/@file.txt'" and to issue #3651
<http://subversion.tigris.org/issues/show_bug.cgi?id=3651> "svn copy does
not eat peg revision within copy target path".

* subversion/svn/export-cmd.c
  (svn_cl__export): Reject any non-empty peg revision specifier on the target.

Modified:
    subversion/trunk/subversion/svn/export-cmd.c

Modified: subversion/trunk/subversion/svn/export-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/export-cmd.c?rev=1635085&r1=1635084&r2=1635085&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/export-cmd.c (original)
+++ subversion/trunk/subversion/svn/export-cmd.c Wed Oct 29 10:07:57 2014
@@ -85,7 +85,15 @@ svn_cl__export(apr_getopt_t *os,
 
       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));
+        {
+          const char *peg;
+
+          SVN_ERR(svn_opt__split_arg_at_peg_revision(&to, &peg, to, pool));
+          if (peg[0] && peg[1])
+            return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+                                     _("'%s': a peg revision is not allowed here"),
+                                     APR_ARRAY_IDX(targets, 1, const char *));
+        }
     }
 
   SVN_ERR(svn_cl__check_target_is_local_path(to));