[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A problem with tags vs. revisions

From: Todd Denniston
Subject: Re: A problem with tags vs. revisions
Date: Thu, 21 Jun 2007 07:46:19 -0500
User-agent: Thunderbird (X11/20070221)

Pete Klammer wrote:
Todd wrote (as I have seen many others recommend many times):

Ignore the cvs _revision_ information, it is for CVS's use only. By changing
the cvs revision information you may run the risk of breaking assumptions
the cvs code has about things being on the 1.x revision set[2] and no those
assumptions are not documented any where. Use tags (symbolic names [3])for
the humans, i.e. if you want the set of files in a sand box versioned for
 cvs tag VERSION_2_1

Are tags embeddable in source via $keywords ?

I have code like this:

char strRevision[] = "$Revision: 13.80 $" ;
char strLocker[] = "$Locker: $" ;
char strCompilationDate[] = __DATE__ ;
char strCompilationTime[] = __TIME__ ;

... and this ...
... So my code is version-aware at execution time, can communicate and
compare its major or minor version with other programs, etc.

Can you do that with tags?

Unfortunately I do not know of any RCS keywords that put the tag in the checked out file. There might be something lurking about in the new cvs 1.12.x version, that I am unaware of though.

however, I have done pretty much what you want by other means in the past.
My baselines are tagged using a script, which happens to write either one or two files, the first file is a listing of all the tags and the reasons the tags were placed, the second file (when it is written) is a header file generally named version_number.h with the format:

-----begin version_number.h
char VersionNumber[]="MY_PROG version: 3.4 MY_TAG_3_4 controlled date - 22 May 2001";
-----end version_number.h

and that file is included by any program that needs it.

Because the script writes (and commits) these just before applying the tag, I get the added benefit of having a record, within a second or two, of when tags are applied.

Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter

reply via email to

[Prev in Thread] Current Thread [Next in Thread]