On Tue, Feb 17, 2009 at 9:44 PM, Gary Ruben
<gary.ru...@sci.monash.edu.au> wrote:
> Hi,
>
> I had some trouble getting the keyword extension working with
> 1.1.2+tortoisehg so I thought I'd post my experience and some
> suggestions of how the Mercurial.ini file might be changed to make this
> a bit easier.
>
> In the [extensions] section of Mercurial.ini the default line is
> hgext.keyword = !
> but there's a comment saying "A leading '!' disables an extension (new
> in 0.9.5)". Since the '!' was trailing I assumed that this meant that
> keyword was enabled, but I was suspicious so I think it would be less
> confusing if the wording in the .ini file was "A trailing '!'..."

The actual rule is that a ! as the leading character of the path
disables the extension.  So a user could use:

keyword = !C:\mywork\extensions\keyword.py

This disables the extension, but keeps the path there for
informational purposes.
Yes, this was clunky.  I've changed all those lines in the default
Mercurial.ini to be commented out instead of using the '!'.

> I added the following sections to the Mercurial.ini file:
>
> [keyword]
> # expand keywords in all python files in working dir
> **.py =
>
> [keywordmaps]
> Author = {author|user}
> Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
> Source = {root}/{file},v
> Date = {date|utcdate}
> Id = {file|basename},v {node|short} {date|utcdate} {author|user}
> Revision = {node|short}
>
> then typed the following at a DOS prompt:
> hg kwexpand
> according to this
> <http://www.selenic.com/mercurial/wiki/index.cgi/KeywordExtension>
> and it works. I think it wouldn't hurt to add the [keyword] and
> [keywordmaps] sections to the Mercurial.ini file by default, perhaps
> with a pattern that would look at most common file extensions (.c, .h,
> .cpp, README, .txt etc.), even if the extension was left disabled by
> default.

I think I'll do that.

--
Steve

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Tortoisehg-discuss mailing list
Tortoisehg-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss

Reply via email to