CVS $Log$ alternative

Martin Geisler mg at aragost.com
Wed Oct 27 08:54:53 UTC 2010


Markus Korber <korbse at gmx.at> writes:

> Hi,
>
> is there a possibility to get the commit log messages into the
> revisioned file?  Something like CVS' $Log$ keyword?  hg help keyword
> says that the $Log$ keyword is not supported.
>
> However, could this be done with a hook? And what happens upon merging
> changes?

You could try to use the encode/decode filter system we have:

  http://www.selenic.com/mercurial/hgrc.5.html#decode-encode

The decode filter must replace '$Log$' with something from 'hg log' and
the encode filter must replace the 'hg log' part with '$Log$' again.

That way Mercurial will only ever see '$Log$' in the file, but you will
see some 'hg log' output in the working copy.

Please write back if you get it working.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/



More information about the Mercurial mailing list