diff tests/test-keyword.t @ 33076:9062458febca

keyword: restore kwtemplater.match at the end of wrapped webcommands Before this patch, kwweb_skip doesn't restore kwtemplater.match after wrapped webcommands. This suppresses keyword expansion at wrapped webcommands. Typical usecase of this issue is "file" webcommand after annotate, changeset, filediff or so on. To ensure kwtemplater.match=util.never while original webcommand running, this patch makes kwweb_skip yield values returned by it, because it returns generator object.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Mon, 26 Jun 2017 03:40:06 +0900
parents 7f569ce30216
children 0afdc1a4f925
line wrap: on
line diff
--- a/tests/test-keyword.t	Mon Jun 26 03:38:12 2017 +0900
+++ b/tests/test-keyword.t	Mon Jun 26 03:40:06 2017 +0900
@@ -1019,6 +1019,7 @@
 hg serve
  - expand with hgweb file
  - no expansion with hgweb annotate/changeset/filediff
+ - expand with hgweb file, again
  - check errors
 
   $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
@@ -1078,6 +1079,18 @@
   
   
   
+
+(check "kwweb_skip"-ed webcommand doesn't suppress expanding keywords
+at subsequent webcommands)
+
+  $ get-with-headers.py localhost:$HGPORT 'file/tip/a/?style=raw'
+  200 Script output follows
+  
+  expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
+  do not process $Id:
+  xxx $
+  $Xinfo: User Name <user@example.com>: firstline $
+
   $ cat errors.log
 #endif