I need to get the current mercurial changeset to return in a very simple webservice, just the incrementing revision number and not the hash. I know I can use
hg --cwd C:\repos\MyRepo parent
which will return me
changeset: 730:9d347e4a8d47
tag: tip
user: Simon Martin <[email protected]>
date: Tue Jun 12 15:39:45 2012 +0100
summary: Fixed defect #244...
What I need though is just the 730 part of the changeset. The goal is to be able to write a very simple web service that will return that value - this will then be picked up by another application and displayed in the footer to give a quick reference as to which local revision is current. The testing process can then refer to that 'build' which can then be used to identify that.