Blog Archive for March 31, 2010

Getting Mercurial Tip Version in Python

March 31, 2010

I had a need to get hold of the version number of the Tip revision in my Mercurial repository. This was so that I could automatically generate a version number than included this number. This can be done with the following python code:

import os

lPut, lGet = os …