On Fri, 27 Jun 2008 10:42:23 -0500, Will Fiveash <William.Fiveash at sun.com> 
wrote:
> The problem I face is that krb-diag outputs its version which is
> useful when looking at its diagnostic output.  As it is now in the
> kerberos repository the unexpanded SCCS keywords will be output which
> is useless.  In addition, the idea is that the version of the script
> in the krb repository will be the canonical version and people should
> be able to download that version and run it (with the version info
> embedded in the script).  Will this require a Makefile to produce a
> version of the script with its version info expanded?

Hi Will & James.

Replying to a random post of the thread, since I lost its starting post:

It may be possible to use "hg identify" to generate a `node id' with the
repository version.  In Hg there are no file revisions, but you can
extract the changeset hash of the tip of a repository with:

    hg identify --rev tip --id

This should print in stdout something like:

    119bcfbb3bf2

With a makefile rule that pulls this revision at build time, you can
#define a string macro for krb-diag.

A point which may also be interesting is that running "hg identify" on a
large repository with local modifications may not be very fast, so the
hg identify command may have to be run as part of `nightly' or somehow
integrated with the krb-diag build in a way that only runs the command
once for every workspace.  This is arguably an optimization that can be
done later, so it may be sufficient to use just

    KRB5_REVISION:sh=       hg identify --id

for now.


Reply via email to