# HG changeset patch # User Christian Ebert # Date 1168886478 -3600 # Node ID 4f1129ddbdb8334e5c9b42f28553e922d40cf241 # Parent f881ecdcdec9312aa45d4ef96441b6f4f07ef1aa Just re-bin the node kwarg of the hook, instead of using changelog diff -r f881ecdcdec9 -r 4f1129ddbdb8 hgkw/keyword.py --- a/hgkw/keyword.py Mon Jan 15 15:41:59 2007 +0100 +++ b/hgkw/keyword.py Mon Jan 15 19:41:18 2007 +0100 @@ -43,6 +43,7 @@ ''' from mercurial import cmdutil, templater, util +from mercurial.node import * import os.path, re, sys, time deftemplates = { @@ -141,7 +142,7 @@ data = super(kwfilelog, self).read(node) if self.iskwcandidate(data): c = context.filectx(self._repo, self._path, - fileid=node, filelog=self) + fileid=node, filelog=self) return self.kwt.re_kw.sub(lambda m: self.kwt.expand(m, self._path, node=c.node()), data) return data @@ -196,7 +197,7 @@ if not candidates: return - kwt = kwtemplater(ui, repo, node=repo.changelog.tip()) + kwt = kwtemplater(ui, repo, node=bin(args['node'])) for f in candidates: data = repo.wfile(f).read() if not util.binary(data):