> -----Original Message-----
> From: Anner Adrian [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 13, 2000 9:22 AM
> To: [EMAIL PROTECTED]
> Subject: Version number of cvs project
>
> Hello,
>
> I just made the beta4 Tag in my program. Now I want display this tag
> or/and a number in an info Dialog. The number must be
> increased every time a file
> is commited.
> How can I get the number and the tag?
Keyword expansion is the ticket. The keyword that expands into a tag is $Name$.
Note however, that $Name$ only gets expanded with the tag if you checkout the
module via the tag. This is actually pretty nice in my opinion, given my two
secanrios of "release" and "development".
When I want to do a "release" of my project I a) apply the tag, b) go to some
clean area of storage (not where I do my development), c) checkout the module
via the tag, and d) build the project/install media. Voila, $Name$ is expanded.
My installation package contains the tag, and a snippet of code converts it
into a nicely formatted display string. (You can't put spaces or periods in a
tag, but I want my version displayed as "SuperProgram 3.1", so there is some minor
character substitution to do.)
When I want to do development, I generally want to start with the latest code.
I just checkout the module, specifying no tag. I get the latest revisions, and
$Name$ is not expanded. My snippet of code notices this, and returns "Development Version" as the display string.
This works for me in the simple way I use CVS. I'm sure there are other paradigms
(say, involving branching and merging branches) where this method would fail. Also,
it doesn't address your issue of increasing the number each time the file is committed.
To do that, $Id$ I'm pretty sure contains the file revision among other things.
Hope this helps...
- - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - -
This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.
