subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1758269 - /subversion/trunk/subversion/svn/merge-cmd.c
Date Mon, 29 Aug 2016 17:51:38 GMT
Author: stsp
Date: Mon Aug 29 17:51:38 2016
New Revision: 1758269

URL: http://svn.apache.org/viewvc?rev=1758269&view=rev
Log:
Fix issue #4652 in a different way. r1758069 fixed it in libsvn_subr but as
Ivan Zhakov points out the root cause of the problem is that 'svn merge'
passes in invalid data to svn_client_merge5().

* subversion/svn/merge-cmd.c
  (run_merge): If the merge target path is a URL, return an error message.

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

Modified: subversion/trunk/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/merge-cmd.c?rev=1758269&r1=1758268&r2=1758269&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/merge-cmd.c (original)
+++ subversion/trunk/subversion/svn/merge-cmd.c Mon Aug 29 17:51:38 2016
@@ -123,6 +123,11 @@ run_merge(svn_boolean_t two_sources_spec
                                 _("Merge sources must both be "
                                   "either paths or URLs"));
 
+      if (svn_path_is_url(targetpath))
+        return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                                 _("Merge target '%s' must be a local path "
+                                   "but looks like a URL"), targetpath);
+
       if (opt_state->verbose)
         SVN_ERR(svn_cmdline_printf(scratch_pool, _("--- Merging\n")));
       merge_err = svn_client_merge5(sourcepath1,



Mime
View raw message