Bugs in svn copy URL1 URL2 WC
From: Julian Foad <julianfoad_at_apache.org>
Date: Fri, 09 Nov 2018 16:22:10 +0000
Some bugs in "svn copy URL1 URL2 WC".
The problem is in repos_to_wc_copy(): we calculate a 'top_src_url' as the longest common ancestor of the source URLs. When they have no common ancestor (in this example, http: vs. https:), this error results.
$ svn copy https://svn.apache.org/repos/asf/ https://svn.apache.org/repos/infra/ notes/
A similar failure mode. In this example, the longest common ancestor is a valid URL but is not a repository.
$ svn cp ^/apr/examples ^/subversion/README notes/
This example fails after copying the first source, because repos_to_wc_copy_single() has re-parented the session to point to the URL it used, and the caller didn't expect that.
For the first two cases, I propose that svn should require the copy sources are all in the same repository, and error out if not. And document the requirement in the API docs and 'svn help copy'.
For the third case, I propose we should fix the bug.
All these cases need tests.
-- - JulianReceived on 2018-11-09 17:22:18 CET
This is an archived mail posted to the Subversion Dev mailing list.