--- a/hgkw/keyword.py Mon Jan 15 20:18:43 2007 +0100
+++ b/hgkw/keyword.py Tue Jan 16 01:04:46 2007 +0100
@@ -11,6 +11,9 @@
files (like LaTeX packages), that are mostly addressed to an audience
not running a version control system.
+For in-depth discussion refer to
+<http://www.selenic.com/mercurial/wiki/index.cgi/KeywordPlan>.
+
You can either use the default cvs-like keywords or provide your
own in hgrc.
@@ -34,10 +37,10 @@
[keyword]
**.py = expand
...
- # in case you prefer you own keyword maps over the cvs-like defaults:
+ # in case you prefer your own keyword maps over the cvs-like defaults:
[keywordmaps]
- hgdate = {date|rfc822date}
- lastlog = {desc}
+ HGdate = {date|rfc822date}
+ lastlog = {desc|firstline}
checked in by = {author}
...
'''
@@ -97,6 +100,7 @@
False, '', False)
def expand(self, mobj, path, node):
+ '''Expands keyword with corresponding template.'''
kw = mobj.group(1)
template = templater.parsestring(self.templates[kw], quoted=False)
self.t.use_template(template)
@@ -148,7 +152,7 @@
if self.iskwcandidate(text):
text = self.kwt.re_kw.sub(r'$\1$', text)
return super(kwfilelog, self).add(text,
- meta, tr, link, p1=p1, p2=p2)
+ meta, tr, link, p1=p1, p2=p2)
def cmp(self, node, text):
'''Removes keyword substitutions for comparison.'''