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

Re: ambiguous svn cp result

From: Hari Kodungallur <hkodungallur_at_gmail.com>
Date: Tue, 14 Oct 2008 12:24:28 -0700

On Tue, Oct 14, 2008 at 11:50 AM, Travis Goff <constantine_272_at_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
Received on 2008-10-14 21:25:04 CEST

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.