[cvsnt] Re: assiging revision 0.1

Bo Berglund bo.berglund at telia.com
Mon Aug 16 22:01:06 BST 2004


On Mon, 16 Aug 2004 15:49:44 -0400, John Peacock <jpeacock at rowman.com>
wrote:

>abhishek jaiswal wrote:
>
>> Now I want to know whether it is possible to assign the version
>> number 0.1 at the beginning. If yes then how.
>
>CVS $Revision:$ != program version
>
>Although the CVS $Revision:$ tag looks awfully like a program version 
>number, as soon as you start branching, you'll discover that CVS uses it 
>in a fashion that is not necessarily predictible.  It is also impossible 
>to set the $Revision:$ to some arbitrary value.
>
>Some Perl programmers have done things like this:
>
>	$VERSION = sprintf "%d.%03d", q$Revision: 1.1 $ =~ /(\d+)/g;
>
>which basically snips out the digits and then prints them with the 
>appropriate number of leading zeros to make sense.  However, as I 
>suggested above, this only works if you never branch (or perform a 
>vendor import).
>
>HTH
>
>John

And if a project contains more than one file (and all of mine do) then
all files are not edited every time a change is made so the files in
the project start out as revision 1.1 but slowly diverge to completely
different revision numbers.
Revisions are really CVS internal stuff and should never be considered
anything that corresponds to a product version.
That is however exactly what tags are for.
Please read up on the use of tags.


/Bo
(Bo Berglund, developer in Sweden)



More information about the cvsnt mailing list