hgkw/keyword.py
branchsolo-extension
changeset 60 9771775ef322
parent 59 94b26168791d
child 61 1fe48bf82d05
--- a/hgkw/keyword.py	Fri Dec 29 16:34:01 2006 +0100
+++ b/hgkw/keyword.py	Fri Dec 29 16:58:19 2006 +0100
@@ -15,6 +15,15 @@
 files (like LaTeX packages), that are mostly addressed to an audience
 not running a version control system.
 
+Supported keywords are (changeset 000000000000):
+    $Revision: 000000000000 $
+    $Author: Your Name <address@example.com> $
+    $Date: %a %b %d %H:%M:%S %Y %z $
+    $RCSFile: basename,v $
+    $Source: /path/to/basename,v $
+    $Id: basename,v 000000000000 %Y-%m-%d %H:%M:%S %z shortname $
+    $Header: /path/to/basename,v 000000000000 %Y-%m-%d %H:%M:%S %z shortname $
+
 The extension, according to its hackish nature, is a hybrid and consists
 actually in 2 parts:
 
@@ -64,7 +73,7 @@
     Date = util.datestr(date=date)
     revdateauth = '%s %s %s' % (Revision,
             util.datestr(date=date, format=util.defaultdateformats[0]),
-            util.shortuser(Author))             # %Y-%m-%d %H:%M:%S
+            util.shortuser(Author))
     Header = '%s %s' % (Source, revdateauth)
     Id = '%s %s' % (RCSFile, revdateauth)
 
@@ -128,7 +137,7 @@
     '''pretxncommit hook that collects candidates for keyword expansion
     on commit and expands keywords in working dir.'''
 
-    if hooktype != 'pretxncommit': # bail out with error
+    if hooktype != 'pretxncommit':
         return True
 
     # reparse args, opts again as pretxncommit hook is silent about them