info-cvs
[Top][All Lists]
Advanced

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

A problem with tags vs. revisions


From: Pete Klammer
Subject: A problem with tags vs. revisions
Date: Wed, 20 Jun 2007 22:50:46 -0600

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
2.1
 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 ...

    bDevelopmentMajorFirmwareVersion = atoi( &strRevision[strlen("$Revision:
")] ) ;
    // if this is a DEBUG build ...
#ifdef __DEBUG__
    // ... major version is a negative number
    bDevelopmentMajorFirmwareVersion = - bDevelopmentMajorFirmwareVersion ;
#endif
    if( bDevelopmentMajorFirmwareVersion GT 9 ) {
        pstrMinor = &strRevision[strlen("$Revision: xx.")] ;
    } else {
        pstrMinor = &strRevision[strlen("$Revision: x.")] ;
    }

... 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?

--

Peter F. Klammer, P.E. / Netronics Professional Engineering, Inc.

3200 Routt Street / Wheat Ridge, Colorado 80033-5452

(303)915-2673 / f:(303)274-6182 / e:address@hidden

      " Net:Working Programmable Electronics!"

 






reply via email to

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