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

Re: Svn tags and branch creation

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-08-27 10:16:17 CEST

On Aug 26, 2007, at 23:56, Patwardhan, Rajesh wrote:

> Wondering how users are handling the creation of tags and branches
> if a branch or tag already exists ...
>
> For e.g
> 1/ Url: http://svn.mycompany.com/svn/
>
> 2/ I have the typical project -- trunk
> branches --|
> --> mybranch
> tags
>
> Now if a branch for e.g. mybranch exists and I try to create it again
>
> 3/ svn copy $URL/trunk $URL/branches/mybranch
> now if the mybranch exists then I would expect the svn operation
> to fail ..
> But I get
> mybranch/trunk
>
> Any hints or scripts.

The behavior of the svn cp command is consistent with the behavior of
the Unix cp command.

> I am contemplating using svn ls from within the pre-commit hook.
> But svn ls for existing or non existing url only returns a exit
> code of 0, so I have to rely on the message returned by the command …
>
> In case it exists then listing else non existent url error message.
>
> Is this message guaranteed to not change?

If you're talking about parsing for the message "svn: URL 'http://
whatever/branches/whatever' non-existent in that revision" then I
would advise against that. Sure, it could change.

"svn ls <nonexistent_url>" does return an exit status of 1, so I
would recommend using that instead. I'm using Subversion 1.4.4; if
you're using an earlier version, you should probably upgrade. This
may have been fixed recently.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Aug 27 11:03:24 2007

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.