How to embed version information in source code with Mercurial

mercurial

Solution

As comments and other answers mention, it is not a good idea to rely on CVS-like, automatically expanded, tags. Specially since you can extract whatever meta-information you need at any time and almost any granularity afterwards.

However, if you really need it (because your boss says so, for instance), the closest you can get is by making use of the keyword extension that comes bundled with mercurial.

Problem

I would like to embed some version information on top of my source code file with information such as version number, author, and date of edit. Is there a simple way to do this with Mercurial?

Original source

Related problems