hgkw/keyword.py
branchstable
changeset 463 55f535bc13bc
parent 452 f83dd10a4d24
child 465 2f017ca736ce
--- a/hgkw/keyword.py	Wed May 14 02:47:38 2008 +0200
+++ b/hgkw/keyword.py	Thu Jun 12 11:10:04 2008 +0200
@@ -90,7 +90,7 @@
 commands.optionalrepo += ' kwdemo'
 
 # hg commands that do not act on keywords
-nokwcommands = ('add addremove bundle copy export grep incoming init'
+nokwcommands = ('add addremove annotate bundle copy export grep incoming init'
                 ' log outgoing push rename rollback tip'
                 ' convert email glog')
 
@@ -515,6 +515,11 @@
             kwt.restrict = True
         patch_diff(repo, node1, node2, match, fp, changes, opts)
 
+    def kwweb_annotate(web, req, tmpl):
+        '''Wraps webcommands.annotate turning off keyword expansion.'''
+        kwt.matcher = util.never
+        return webcommands_annotate(web, req, tmpl)
+
     def kwweb_changeset(web, req, tmpl):
         '''Wraps webcommands.changeset turning off keyword expansion.'''
         kwt.matcher = util.never
@@ -529,11 +534,13 @@
 
     patchfile_init = patch.patchfile.__init__
     patch_diff = patch.diff
+    webcommands_annotate = webcommands.annotate
     webcommands_changeset = webcommands.changeset
     webcommands_filediff = webcommands.filediff
 
     patch.patchfile.__init__ = kwpatchfile_init
     patch.diff = kw_diff
+    webcommands.annotate = kwweb_annotate
     webcommands.changeset = webcommands.rev = kwweb_changeset
     webcommands.filediff = webcommands.diff = kwweb_filediff