[Cvsnt] assigning version numbers in cvs

John Peacock jpeacock at rowman.com
Thu Jul 25 15:04:24 BST 2002


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.


Bo Berglund wrote:
 >>I would like to understand how I can assign a version number in cvsnt.
 >>Right now, I have 1.1.1.1 assigned by the system when I imported the
 >>files for the first time.  I would like to change this version number to
 >>1.2.5.0.
 >>
 > You have not understood the way CVS works...
 > The numbers you see (1.1.1.1 after an import) are not version numbers,
 > they are *file revision* numbers.
 > These are managed by the CVS system and you should not try to modify
 > them manually.

Not exactly.  For small projects with few files, there is no reason not to use
the file _revision_ numbers as the file _version_ number.  For example, you can
embed something like the following in a Perl script:

	$VERSION = (qw$Revision: 3.2 $)[1]; # parens only needed for Perl < 5.6

and the $VERSION will be incremented as the revision is incremented (as you
commit the file, in other words).  When you want to step up the next major
release, you can bump the revision on all associated files using Commit/Force
Revision.

Of course, if you do this, I recommend that you do your development on a branch,
so that you limit your releases to Revisions like #.#, instead of having lots of
Revision/Version jumps between releases.  Just merge to the HEAD before releasing.

You are correct that for larger projects, it is preferable to use tags to define
"Versions" for release purposes, but it is really not required for small
projects.  But, in practice, the only way that the Revision will ever progress
beyond 1.x is if you force it during a commit.

HTH

John


_______________________________________________
Cvsnt mailing list
Cvsnt at cvsnt.org
http://www.cvsnt.org/cgi-bin/mailman/listinfo/cvsnt https://www.march-hare.com/cvspro/en.asp#downcvs



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook