Application access its own version in mercurial repository
The best approach is probably to use precommit hook to replace a designated file with the output of hg log -r tip, possibly with a --template arg to format it in a particular way.
Unfortunately, there's a bit of a chicken and egg problem.  The revision is a checksum of the commited data, but the checksum is not available until after the commit has taken place.  One option might be to actually hook on commit instead of precommit, and commit the version info in a seperate changeset.
I have application I want to print out (in "about" box) its revision/version from mercurial. Suppose it is revision deadbeef so it will know that. In old times in CVS could use something like $Revision$ to substitute automatically.
What is best practice with Mercurial for this?