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

Re: Preventing accidental duplicate branching on 1.4.2

From: David Weintraub <qazwart_at_gmail.com>
Date: Wed, 6 May 2009 22:15:26 -0400

On Tue, May 5, 2009 at 10:24 AM, Eric Olson <Eric.Olson_at_adm.com> wrote:
> We’re still using the svn 1.4 branch and I’ve noticed something that doesn’t
> seem right to me. As I understand it, the correct way to create a branch is:
> svn copy […]/trunk/ […]/branches/foo/ -m “Creating foo branch”
>
> Which works exactly as I expected. If I turn around and immediately run the
> same command, which I was expecting to fail because the foo branch already
> exists, svn instead creates /branches/foo/trunk/.  A third execution of that
> same command throws an error because the directory already exists.
>
> Is that the expected behavior? I’m just worried about svn users branching
> twice or accidentally reusing an old branch name.

It is the same behavior you have in a Unix "cp" or "mv" command:

$ mv foo_dir bar_dir

Will change the name of "foo_dir" to "bar_dir" if "bar_dir" doesn't
exist. However, if "bar_dir" does exist, it will move "foo_dir" under
the bar_dir directory. Same thing with the "cp -R" command.

-- 
David Weintraub
qazwart_at_gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2088420
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-05-07 04:16:47 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.