hgkw/keyword.py
branchkwmap-templates
changeset 146 df9de07ce002
parent 145 1c2cefa97b96
child 147 11a031a33ea2
--- a/hgkw/keyword.py	Thu Feb 15 09:25:05 2007 +0100
+++ b/hgkw/keyword.py	Thu Feb 15 17:31:45 2007 +0100
@@ -23,37 +23,15 @@
 # The user has the choice either to create his own keywords and their
 # expansions or to use the CVS-like default ones.
 #
-# Default $keywords$ and their $keyword: substition $ are:
-#     Revision: changeset id
-#     Author:   username
-#     Date:     %Y/%m/%d %H:%M:%S [UTC]
-#     RCSFile:  basename,v
-#     Source:   /path/to/basename,v
-#     Id:       basename,v csetid %Y/%m/%d %H:%M:%S username
-#     Header:   /path/to/basename,v csetid %Y/%m/%d %H:%M:%S username
-#
 # Expansions spanning more than one line are truncated to their first line.
 # Incremental expansion (like CVS' $Log$) is not supported.
 #
-# Simple setup in hgrc:
+# Setup in hgrc:
 #
 #     # enable extension
 #     keyword = /full/path/to/keyword.py
 #     # or, if script in hgext folder:
 #     # hgext.keyword =
-#
-#     # filename patterns for expansion are configured in this section
-#     # files matching patterns with value 'ignore' are ignored
-#     [keyword]
-#     **.py =
-#     x* = ignore
-#     ...
-#     # in case you prefer your own keyword maps over the cvs-like defaults:
-#     [keywordmaps]
-#     HGdate = {date|rfc822date}
-#     lastlog = {desc} ## same as {desc|firstline} in this context
-#     checked in by = {author}
-#     ...
 
 '''keyword expansion in local repositories
 
@@ -69,6 +47,31 @@
 
 Configuration is done in the [keyword] and [keywordmaps] sections of
 hgrc files.
+
+Example:
+     # filename patterns for expansion are configured in this section
+     # files matching patterns with value 'ignore' are ignored
+     [keyword]
+     **.py =
+     x* = ignore
+     ...
+     # in case you prefer your own keyword maps over the cvs-like defaults:
+     [keywordmaps]
+     HGdate = {date|rfc822date}
+     lastlog = {desc} ## same as {desc|firstline} in this context
+     checked in by = {author}
+     ...
+
+If you do not have any [keywordmaps] configured the extension falls back on
+the following defaults:
+
+     Revision: changeset id
+     Author: username
+     Date: %Y/%m/%d %H:%M:%S [UTC]
+     RCSFile: basename,v
+     Source: /path/to/basename,v
+     Id: basename,v csetid %Y/%m/%d %H:%M:%S username
+     Header: /path/to/basename,v csetid %Y/%m/%d %H:%M:%S username
 '''
 
 try:
@@ -77,7 +80,7 @@
     demandload(globals(), 'mercurial:cmdutil,templater,util')
     demandload(globals(), 'mercurial:context,filelog,revlog')
     demandload(globals(), 're time')
-except ImportError: # demandimport
+except ImportError:                    # demandimport
     from mercurial.i18n import _
     from mercurial import cmdutil, templater, util
     from mercurial import context, filelog, revlog