--- a/hgkw/keyword.py Sun Jan 14 12:56:52 2007 +0100
+++ b/hgkw/keyword.py Sun Jan 14 18:38:30 2007 +0100
@@ -96,7 +96,8 @@
self.t = cmdutil.changeset_templater(self.ui, self.repo,
False, '', False)
- def expand(self, mobj, path):
+ def expand(self, mobj, path, node=None):
+ self.node = self.node or node
kw = mobj.group(1)
template = templater.parsestring(self.templates[kw], quoted=False)
self.t.use_template(template)
@@ -141,9 +142,8 @@
if self.iskwcandidate(data):
c = context.filectx(self._repo, self._path,
fileid=node, filelog=self)
- self.kwt.node = c.node()
return self.kwt.re_kw.sub(lambda m:
- self.kwt.expand(m, self._path), data)
+ self.kwt.expand(m, self._path, node=c.node()), data)
return data
def add(self, text, meta, tr, link, p1=None, p2=None):