Matt Mackall <mpm at selenic.com> writes:

> On Wed, Aug 01, 2007 at 03:37:25PM -0700, Alexander Novick wrote:
>> We usually use /usr/sbin/modinfo to determine versions for specific modules.
>> With removal of user visible SCCS keywords how can we get module version
>> if the version is not implanted  in th binary?
>
> Without keywords, you can do:
>
> char version[] = VERSION;
>
> cc -DVERSION="\"`hg id -i`\"" foo.c
>

We already bake VERSION into the resulting objects (where VERSION is
set by the build, in an assumed-sensible fashion), it's both in the
.comment section, and stored with the CTF information (which where
::showrev and similar retrieve it from).

-- Rich

Reply via email to