# HG changeset patch # User Christian Ebert # Date 1167407899 -3600 # Node ID 9771775ef32273dbe6314f39eb16eb4247005cad # Parent 94b26168791dfa2c6de733687207c685e57f7a06 List supported keywords in doc diff -r 94b26168791d -r 9771775ef322 hgkw/keyword.py --- 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 $ + $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