[cvsnt] Re: tag control

Oliver Giesen ogware at gmx.net
Mon Apr 26 10:16:52 BST 2004


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Friedrich Niederreiter wrote:
> we are in the process of investigating the switch from
> an exclusive lock oriented Version Control System to
> CVS. Currently, we use tags very heavily to identify a
> healthy (at least compilable) version of our main
> stream software and assing about two tags a day. For
> this reason, anybody creating a tag must prevent
> everybody else from making a tag, to avoid situations
> where one tag is not already fully assigned to the
> correct revisions, but already used as a base for the
> second person creating another tag.

As long as you tag your working copies (i.e. cvs tag) instead of the 
repository (i.e. cvs rtag) and you use unique tag names there should be 
no problem. Tag operations are not atomic however AFAIK.


> I understand that using the edit/watch features and a
> defined process flow would minimize this risk.

I don't see how this could affect tags...


> - Is the assignment of two tags at the same time not a
> problem when using CVS? If not, why not?

If both users use the tag command instead of rtag they will tag exactly 
the set of files that's currently in their sandbox. In this situation it 
doesn't matter if somebody else has already committed newer revisions.

The critical situation is when both users attempt to use the same tag 
name and have different sets of files. Most CVS operations are to my 
knowledge only atomic at the directory level, i.e. only one user could 
read or write to/from a given folder at any given point in time. If the 
files are spread over multiple directories and two users attempt to 
apply the same tag at exactly the same time the user who gets to a 
directory first will set the tag on it. The other user will get a 
warning that the tag already exists (unless the user gave the -F option 
to overwrite).

However, unless the set of files that is to be tagged is enormously big 
(i.e. the tagging operation takes unusually long) or you have hundreds 
of users working concurrently I think it is rather unlikely that this 
will happen. Furthermore, it really should be an up-front arrangement 
who sets which tags and when so the situation should be even more unlikely.


> - Is this problem somehow supported by CVS, possibly
> by using exclusive locks on a dedicated file?

CVS will warn you if a tag already exists and refuse to set it unless 
you explicitly tell it to overwrite the existing tag but beyond that, as 
I said, to my knowledge tagging is currently not atomic.


I hope I have correctly interpreted your concern... not entirely sure 
though...

Hope this helps.

-- 
Oliver
----	------------------
JID:	ogiesen at jabber.org
ICQ:	18777742	(http://wwp.icq.com/18777742)



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook