[PATCH][RFC] Support for keyword expansion
ergosys at gmail.com
Tue Sep 20 10:36:44 CDT 2005
On Mon, 2005-09-19 at 14:05 -0700, Matt Mackall wrote:
> On Tue, Aug 30, 2005 at 09:29:38PM +0200, Goffredo Baroncelli wrote:
> > Hi all,
> > the patch below is an initial support for a keywords expansion framework.
> Can you rework this as a generic filter script for contrib/?
> I'm personally not a believer in keyword expansion - you either a)
> have the repo at hand to query such things directly, making it
> redundant or b) you've gotten a copy of the file without access to the
> repo, in which case the expansions are potentially out of date or more
> often irrelevant, etc. About the only thing they're good for is determining
> whether a hardcopy sitting on your desk should be recycled, for which
> the answer is usually yes anyway.
The only useful application of keyword expansion I've ever seen was when
it was used to embed version information in object code (using static
char *'s). Assuming builds are done correctly, libraries and
executables can be examined with the "strings" program to identify the
source files used in the build.
This was with a CVS based system, and a string was embedded in each
file. With mercurial, the ChangeSet id could be a useful expansion for
each executable, but since hg can be used to generate that information,
keyword expansion would just be a convenience.
More information about the Mercurial