subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Hartman <hartman.nat...@gmail.com>
Subject Re: svn copy twice to same folder creates unexpeted subfolder in destination
Date Thu, 07 Nov 2019 14:04:32 GMT
On Thu, Nov 7, 2019 at 8:19 AM Roger PĂ©riat <roger.periat@bluewin.ch> wrote:

> Hi all
>
> Not sure if this is a bug or not.
>
> Doing a svn copy twice to same destination, does create an unexpected
> subfolder in destination.


It's not a bug. The last component of the destination path for the copy can
be interpreted two ways:

(1) As a new name for the object being copied. This is the case in your
first step:

1) first step
>
> (The tags folder exists and is empty)
>
> svn copy file:///D:/tmp/myrepo/trunk file:///D:/tmp/myrepo/tags/v1 -m
> "this is v1"


Because tmp/myrepo/tags/v1 does not exist yet, this is taken as a "copy and
rename" -- copy trunk to the tags directory and call it v1 instead of trunk.

(2) The other way the last component of the destination path for the copy
can be interpreted is simply as part of the destination path. Because v1
already exists in your second step, the last component of the path (v1) is
not given any special treatment and trunk is copied into the v1 directory.

I hope this (admittedly verbose) explanation makes sense... if not let us
know. :-)

Kind regards,
Nathan

Mime
View raw message