Monotone-increasing Version Number based on Mercurial Commits
Posted
by Isaac
on Stack Overflow
See other posts from Stack Overflow
or by Isaac
Published on 2010-03-21T06:30:36Z
Indexed on
2010/03/21
6:41 UTC
Read the original article
Hit count: 342
mercurial
|versioning
When I was using subversion for the code for an application, I could append a period and the result of svnversion
to the version number to create a unique and monotone-increasing version number and also be guaranteed that any check-out of the same revision of the code would generate the same version number.
In Mercurial, because revision numbers are not necessarily consistent across clones, the local revision number is not suitable. The hash is appropriately unique and consistent, but does not create a number that is monotone-increasing. How can I generate a suitable number to append to the version number based on the Mercurial repository commits?
© Stack Overflow or respective owner