[cvsnt] Re: assiging revision 0.1

John Peacock jpeacock at rowman.com
Mon Aug 16 20:49:44 BST 2004


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



More information about the cvsnt mailing list