##// END OF EJS Templates
keyword: restore kwtemplater.match at the end of wrapped webcommands...
FUJIWARA Katsunori -
r33064:9062458f default
parent child Browse files
Show More
@@ -675,8 +675,13 b' def reposetup(ui, repo):'
675
675
676 def kwweb_skip(orig, web, req, tmpl):
676 def kwweb_skip(orig, web, req, tmpl):
677 '''Wraps webcommands.x turning off keyword expansion.'''
677 '''Wraps webcommands.x turning off keyword expansion.'''
678 origmatch = kwt.match
678 kwt.match = util.never
679 kwt.match = util.never
679 return orig(web, req, tmpl)
680 try:
681 for chunk in orig(web, req, tmpl):
682 yield chunk
683 finally:
684 kwt.match = origmatch
680
685
681 def kw_amend(orig, ui, repo, commitfunc, old, extra, pats, opts):
686 def kw_amend(orig, ui, repo, commitfunc, old, extra, pats, opts):
682 '''Wraps cmdutil.amend expanding keywords after amend.'''
687 '''Wraps cmdutil.amend expanding keywords after amend.'''
@@ -1019,6 +1019,7 b' kwexpand nonexistent'
1019 hg serve
1019 hg serve
1020 - expand with hgweb file
1020 - expand with hgweb file
1021 - no expansion with hgweb annotate/changeset/filediff
1021 - no expansion with hgweb annotate/changeset/filediff
1022 - expand with hgweb file, again
1022 - check errors
1023 - check errors
1023
1024
1024 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1025 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
@@ -1078,6 +1079,18 b' hg serve'
1078
1079
1079
1080
1080
1081
1082
1083 (check "kwweb_skip"-ed webcommand doesn't suppress expanding keywords
1084 at subsequent webcommands)
1085
1086 $ get-with-headers.py localhost:$HGPORT 'file/tip/a/?style=raw'
1087 200 Script output follows
1088
1089 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
1090 do not process $Id:
1091 xxx $
1092 $Xinfo: User Name <user@example.com>: firstline $
1093
1081 $ cat errors.log
1094 $ cat errors.log
1082 #endif
1095 #endif
1083
1096
General Comments 0
You need to be logged in to leave comments. Login now