hgkw/keyword.py
branchkwmap-templates
changeset 100 4f1129ddbdb8
parent 99 f881ecdcdec9
child 101 98a65d978098
--- 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):