This is actually the designed implementation for many Subversion releases.

 

If the target doesn’t exist, the source is copied to the target. If it does exist it is copied below the target.

 

This matches the behavior of Unix’s 'cp' and Windows’ 'copy' for these cases.

 

In your third case you find that the target below the passed target already exists, and you get an error.

 

                Bert

 

From: Croft, Joe [mailto:Croft_Joe@shure.com]
Sent: maandag 16 juni 2014 17:40
To: users@subversion.apache.org
Subject: New subversion bug?

 

Hi Yall,

 

I ran into the problem that when I do an svn copy command three times, it behaves differently each time. The command line is:

 

svn cp https://server.com/Projects/project_a/trunk https://server.com/Projects/project_a/tags/tag_a

 

The first time I run this I end up with what I expect, a directory with the url of

 

https://server.com/Projects/project_a/tags/tag_a

 

which contains the files and folders which are under ‘trunk’ of the original url.

 

The second time I run this I get an unexpected directory with the folder

 

https://server.com/Projects/project_a/tags/tag_a/trunk

 

which also contain all of the folders and files which are under the ‘trunk’ of the original url

 

On the third and subsequent executions of the same command, I get the error I expected on the second invocation except for the url that it complains about already existing. The error is

 

                Svn: E160020: Path ‘trunk’ already exists.

 

I really  the error “Svn: E160020: Path ‘tag_a’ already exists” on the second invocation of the command.

 

I am running with svn server 1.6 on linux. The client can be windows or linux 1.6 or 1.7. Adding a trailing slace (“/”) to the urls does not help, nor does providing a revision option to the command.

 

   Thank you,

         Joe

 

 

 


------------------------------------------------------------ This e-mail message (including any attachments) contains confidential, non-public information. It also may be protected by the attorney/client or other applicable privileges. It is intended to be communicated only to the designated recipient(s). Unauthorized use, reproduction, dissemination, or communication of this message or any information contained in this message is strictly prohibited and may be unlawful. If you are not an intended recipient of this message, please notify the sender promptly by e-mail or telephone at the sender's location indicated above or contact Shure Incorporated at info@shure.com or 800-25-SHURE (800-257-4873). ------------------------------------------------------------  ­­