[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: calling svn copy twice...

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Wed, 8 Dec 2010 13:19:30 +0100

On Wed, Dec 8, 2010 at 12:40 PM, Michael Kessler
<kessler.michael_at_gmx.net> wrote:
> Hi,
>
> during tests with hudson my release build script was accidentally called
> more than once. The script calls svn copy too.
>
> 1. svn copy file:///var/repo/prj/trunk file:///var/repo/prj/tags/V1 -m
> "created V1"
>
> In the Repo:
> ../prj/tags/V1/test.txt
> OK
>
> 2. svn copy file:///var/repo/prj/trunk file:///var/repo/prj/tags/V1 -m
> "created V1"
>
> In the Repo:
> ../prj/tags/V1/trunk/text.txt ????
>
> I don't understand this behaviour. I expect an error message.
>
> 3. 2. svn copy file:///var/repo/prj/trunk file:///var/repo/prj/tags/V1
> -m "created V1"
>
> :~/svn: Path tags/V1/trunk already exists
>
> I tried it with:
>
> Windows XP SP3
> CollabNet Subversion Command-Line Client v1.6.15
>
> Ubuntu 10.04
> svn Version 1.6.6 (r40053)

That's actually perfectly analogous to the behaviour of the unix cp
command, when copying directories:

---------- 8< -------------
bash-3.00$ mkdir test
bash-3.00$ ls -l
total 8
drwxr-xr-x 2 user group 4096 Dec 8 12:11 test
bash-3.00$ cp -r test target
bash-3.00$ ls -l
total 16
drwxr-xr-x 2 user group 4096 Dec 8 12:11 target
drwxr-xr-x 2 user group 4096 Dec 8 12:11 test
bash-3.00$ ls -l target
total 0
bash-3.00$ cp -r test target
bash-3.00$ ls -l
total 16
drwxr-xr-x 3 user group 4096 Dec 8 12:11 target
drwxr-xr-x 2 user group 4096 Dec 8 12:11 test
bash-3.00$ ls -l target
total 8
drwxr-xr-x 2 user group 4096 Dec 8 12:11 test

---------- 8< -------------

So svn's cp behaviour is simply based on the standard behaviour of cp.

Cheers,

-- 
Johan
Received on 2010-12-08 13:20:30 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.