You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Lübbe Onken <L....@rac.de> on 2003/10/01 07:20:29 UTC

svn copy onto itself is possible

Hi folks,

yesterday i accidentally did a:

svn copy http://myserver/myrepos/trunk/ http://myserver/myrepos/trunk/

Subversion complied and created a copy in
http://myserver/myrepos/trunk/trunk.
I don't know if that behaviour is desired, but I think a warning would have
been a nice thing. This is the only time, that subversion doesn't warn you
when the target URL already exists in the filesystem.

Ist this a bug or....

Cheers
-Lübbe

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: svn copy onto itself is possible

Posted by Ben Collins-Sussman <su...@collab.net>.
Lübbe Onken <L....@rac.de> writes:

> 
> svn copy http://myserver/myrepos/trunk/ http://myserver/myrepos/trunk/
> 
> Subversion complied and created a copy in
> http://myserver/myrepos/trunk/trunk.

Yes, it's possible.  There are no cycles here, because the commit is
creating an entirely new tree "N+1", where /trunk/trunk/ is just a
duplication of the /trunk directory in revision N.

> I don't know if that behaviour is desired, but I think a warning would have
> been a nice thing. This is the only time, that subversion doesn't warn you
> when the target URL already exists in the filesystem.

Why would it warn you?  There's nothing wrong with the target URL
already existing.

'svn cp' behaves like 'unix cp'.  If you run 'cp dir1/ dir2/', it
creates dir2/dir1/.

> Ist this a bug or....

Nope.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org