##// END OF EJS Templates
keyword: disable expansion for annotate...
Christian Ebert -
r6667:01e95d4b default
parent child Browse files
Show More
@@ -88,7 +88,7 b' import re, shutil, tempfile, time'
88 88 commands.optionalrepo += ' kwdemo'
89 89
90 90 # hg commands that do not act on keywords
91 nokwcommands = ('add addremove bundle copy export grep incoming init'
91 nokwcommands = ('add addremove annotate bundle copy export grep incoming init'
92 92 ' log outgoing push rename rollback tip'
93 93 ' convert email glog')
94 94
@@ -513,6 +513,11 b' def reposetup(ui, repo):'
513 513 kwt.restrict = True
514 514 patch_diff(repo, node1, node2, match, fp, changes, opts)
515 515
516 def kwweb_annotate(web, req, tmpl):
517 '''Wraps webcommands.annotate turning off keyword expansion.'''
518 kwt.matcher = util.never
519 return webcommands_annotate(web, req, tmpl)
520
516 521 def kwweb_changeset(web, req, tmpl):
517 522 '''Wraps webcommands.changeset turning off keyword expansion.'''
518 523 kwt.matcher = util.never
@@ -527,11 +532,13 b' def reposetup(ui, repo):'
527 532
528 533 patchfile_init = patch.patchfile.__init__
529 534 patch_diff = patch.diff
535 webcommands_annotate = webcommands.annotate
530 536 webcommands_changeset = webcommands.changeset
531 537 webcommands_filediff = webcommands.filediff
532 538
533 539 patch.patchfile.__init__ = kwpatchfile_init
534 540 patch.diff = kw_diff
541 webcommands.annotate = kwweb_annotate
535 542 webcommands.changeset = webcommands.rev = kwweb_changeset
536 543 webcommands.filediff = webcommands.diff = kwweb_filediff
537 544
@@ -214,6 +214,8 b' cat a b'
214 214 echo % hg cat
215 215 hg cat sym a b
216 216 echo
217 echo % annotate
218 hg annotate a
217 219
218 220 echo % remove
219 221 hg debugrebuildstate
@@ -294,6 +294,11 b' xxx $'
294 294 $Xinfo: User Name <user@example.com>: firstline $
295 295 ignore $Id$
296 296 a
297 % annotate
298 1: expand $Id$
299 1: do not process $Id:
300 1: xxx $
301 2: $Xinfo$
297 302 % remove
298 303 % status
299 304 % rollback
General Comments 0
You need to be logged in to leave comments. Login now