Mercurial > hg
comparison tests/test-keyword.t @ 33064: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 |
comparison
equal
deleted
inserted
replaced
33063:7f569ce30216 | 33064:9062458febca |
---|---|
1017 | 1017 |
1018 #if serve | 1018 #if serve |
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 |
1025 $ cat hg.pid >> $DAEMON_PIDS | 1026 $ cat hg.pid >> $DAEMON_PIDS |
1026 $ get-with-headers.py localhost:$HGPORT 'file/tip/a/?style=raw' | 1027 $ get-with-headers.py localhost:$HGPORT 'file/tip/a/?style=raw' |
1076 +$Xinfo$ | 1077 +$Xinfo$ |
1077 | 1078 |
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 |
1084 Prepare merge and resolve tests | 1097 Prepare merge and resolve tests |
1085 | 1098 |