Try making help more concise, include warning about "hg import" kwmap-templates
authorChristian Ebert <blacktrash@gmx.net>
Sun, 18 Feb 2007 20:10:37 +0100
branchkwmap-templates
changeset 147 11a031a33ea2
parent 146 df9de07ce002
child 148 c0baa881d90a
Try making help more concise, include warning about "hg import"
hgkw/keyword.py
--- a/hgkw/keyword.py	Thu Feb 15 17:31:45 2007 +0100
+++ b/hgkw/keyword.py	Sun Feb 18 20:10:37 2007 +0100
@@ -26,6 +26,8 @@
 # Expansions spanning more than one line are truncated to their first line.
 # Incremental expansion (like CVS' $Log$) is not supported.
 #
+# Binary files are not touched.
+#
 # Setup in hgrc:
 #
 #     # enable extension
@@ -45,29 +47,33 @@
 Substitution takes place on every commit and update of the working
 repository.
 
+Caveat: "hg import" might fail if the patches were exported from a
+repo with a different/no keyword setup, whereas "hg unbundle" is
+safe.
+
 Configuration is done in the [keyword] and [keywordmaps] sections of
 hgrc files.
 
 Example:
+     [keyword]
      # filename patterns for expansion are configured in this section
      # files matching patterns with value 'ignore' are ignored
-     [keyword]
-     **.py =
-     x* = ignore
+     **.py =          ## expand keywords in all python files
+     x* = ignore      ## but ignore files matching "x*"
      ...
-     # in case you prefer your own keyword maps over the cvs-like defaults:
      [keywordmaps]
+     # custom hg template maps _replace_ the CVS-like default ones
      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:
+If no [keywordmaps] are configured the extension falls back on the
+following defaults:
 
      Revision: changeset id
      Author: username
-     Date: %Y/%m/%d %H:%M:%S [UTC]
+     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