[cvsnt] Re: assiging revision 0.1

John Peacock jpeacock at rowman.com
Mon Aug 16 20:49:44 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.


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
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook