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

RE: Safely creating a tag/branch?

From: Dale Worley <dworley_at_pingtel.com>
Date: 2005-08-16 17:25:59 CEST

> From: Dale Worley [mailto:dworley@pingtel.com]
>
> > The question is how to prevent this from happening, other
> > than having person
> > #1 talk to person #2 and/or vice versa?
>
> Use a working copy, so this ambiguity in "svn copy" can't be
> triggered -- the first one to check in tags/release-1 wins.

Though doing a single copy using a working copy is a lot slower. It is more efficient to recover from the error and retry:

1. Do "svn ls https://.../tags" to determine the next available tag number.

2. Do "svn copy https://.../trunk https://.../tags/tag-N" to create the tag at rev R. If it fails, you are the third (or later) person to attempt to create tag-N, and should return to step 1.

3. Examine "svn log -r R https://.../tags" to see if what was created was tags/tag-N or tags/tag-N/trunk. If the former, exit with success. If the latter:

4. Do "svn delete https://.../tags/tag-N/trunk" to get rid of the mistake, and return to step 1.

Or something like that.

Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Aug 16 17:29:54 2005

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.