We recently switched from SVN to Mercurial. We also have a CruiseControl.NET set up to run auto builds which gets the latest from the source control and builds the app.
In the CruiseControl.NET dashboard for auto builds, we want to show the version number. Apparently, mercurial has this hexa decimal version numbers.
What is the common standard for dealing with version numbers in CruiseControl.NET when working with Mercurial source control systems. Are the hexa decimal values used as is? What are the other options?
A great option is:
hg log -r . --template '{latesttag}-{latesttagdistance}-{node|short}'
Which if you're tagging for releases gets you something like:
1.0-10-0746c606103c
which reads as "ten revisions since 1.0 with hash 0746c606103c".
I'll admit I've no idea how to get that value into CruiseControl.NET, but if you can get it to invoke that command you'll have a good value.
If CruiseControl uses always the same source repo and if you are not fond of rewriting history, you can try to use another template-keyword, {rev}
rev Integer. The repository-local changeset revision number.