OT - Capturing Hg revision for Ant

Patrick Waugh ptwaugh at gmail.com
Sun Nov 9 03:00:12 CST 2008


As I finalize my build process for my current project, I have decided
I wish to capture the current Hg revision (somewhat like is done for
Hg itself).

I have thought about perhaps using a hook to run a post commit script
to get that revision (perhaps with awk) into an Ant properties file.
Perhaps something like:

hg.revision=43420f424e89

Which I could then use in Ant.

Does the above sound reasonable, or is there an easier way?

Thoughts?

Patrick


More information about the Mercurial mailing list