You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Travis Goff <co...@yahoo.com> on 2008/10/14 18:50:18 UTC

ambiguous svn cp result

Greetings you users, you,
 
I’m not sure if this is a bug or just poorly defined functionality.  I’m also using svn 1.4.3 and not sure about the most current operation.  After testing hook scripts to protect my tags directory, this appears to be an ambiguous svn cp result.
 
This creates my simple tag:
$ svn cp http:…/something/trunk/ http:…/something/tags/1.0.0
 
Which creates the directory structure: /something/tags/1.0.0/<stuff from trunk>.
 
Scenario of me being stupid and re-tagging by accident.
$ svn cp http:…/something/trunk/ http:…/something/tags/1.0.0
 
This created the directory structure:
/something/
    tags/
        1.0.0/
            <stuff from trunk>
            trunk/<stuff from trunk>
 
Scenario of me being curious and re-re-tagging.
$ svn cp http:…/something/trunk/ http:…/something/tags/1.0.0
 
This outputs the error svn: “Path 'tags/1.0.0/trunk' already exists”
 
IMHO, because I did not put a / at the end of the directory 1.0.0, the second svn cp should throw an error “Path ‘tags/1.0.0’ already exists”.  However, if the / is added to the end of 1.0.0, then svn cp should create the tags/1.0.0/trunk directory as it did.  I am concerned about the fact that svn cp does either one of two operations from the same command and that there's no way to differentiate between the two operations.
 
Thanks,
-Travis
 


      

Re: ambiguous svn cp result

Posted by Hari Kodungallur <hk...@gmail.com>.
On Tue, Oct 14, 2008 at 11:50 AM, Travis Goff <co...@yahoo.com>wrote:

> Greetings you users, you,
>
>
>
> I'm not sure if this is a bug or just poorly defined functionality.  I'm
> also using svn 1.4.3 and not sure about the most current operation.  After
> testing hook scripts to protect my tags directory, this appears to be an
> ambiguous svn cp result.
>
>
>
> This creates my simple tag:
>
> $ svn cp http:…/something/trunk/ http:…/something/tags/1.0.0
>
>
>
> Which creates the directory structure: /something/tags/1.0.0/<stuff from
> trunk>.
>
>
>
> Scenario of me being stupid and re-tagging by accident.
>
> $ svn cp http:…/something/trunk/ http:…/something/tags/1.0.0
>
>
>
> This created the directory structure:
>
> /something/
>
>     tags/
>
>         1.0.0/
>
>             <stuff from trunk>
>
>             trunk/<stuff from trunk>
>
>
>
> Scenario of me being curious and re-re-tagging.
>
> $ svn cp http:…/something/trunk/ http:…/something/tags/1.0.0
>
>
>
> This outputs the error svn: "Path 'tags/1.0.0/trunk' already exists"
>
>
>
> IMHO, because I did not put a / at the end of the directory 1.0.0, the
> second svn cp should throw an error "Path 'tags/1.0.0' already exists".  However,
> if the / is added to the end of 1.0.0, then svn cp should create the
> tags/1.0.0/trunk directory as it did.  I am concerned about the fact that
> svn cp does either one of two operations from the same command and that
> there's no way to differentiate between the two operations.
>
>
>
> Thanks,
>
> -Travis
>
>
>
>
Svn's copy/move behaviour is consistent with the copy/move (cp/mv) commands
in unix. If the second argument (with or without the "/" character) is a
directory, then the file/dir is copied inside that directory.

Thanks,
-Hari