# HG changeset patch # User FUJIWARA Katsunori # Date 2017-06-25 18:40:57 # Node ID cf0da12afe8a356ee5977fe4f3137899e5963682 # Parent 0afdc1a4f9252b85b8828bd7a278e62e8d9d19a8 keyword: add test for keyword expansion at serving multiple repositories This is safety for subsequent (and future) patches, which change function wrapping. diff --git a/tests/test-keyword.t b/tests/test-keyword.t --- a/tests/test-keyword.t +++ b/tests/test-keyword.t @@ -1097,6 +1097,7 @@ at subsequent webcommands) xxx $ $Xinfo: User Name : firstline $ + $ killdaemons.py $ cat errors.log #endif @@ -1429,3 +1430,46 @@ suppress expanding keywords at subsequen bar $ cd .. + +#if serve + +Test that keywords are expanded only in repositories, which enable +keyword extension, even if multiple repositories are served in a +process + + $ cat >> fetch-merge/.hg/hgrc < [extensions] + > keyword = ! + > EOF + + $ cat > paths.conf < [paths] + > enabled=Test + > disabled=fetch-merge + > EOF + + $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E error.log --webdir-conf paths.conf + $ cat hg.pid >> $DAEMON_PIDS + + $ get-with-headers.py localhost:$HGPORT 'enabled/file/tip/m/?style=raw' + 200 Script output follows + + $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ + bar + + $ get-with-headers.py localhost:$HGPORT 'disabled/file/tip/m/?style=raw' + 200 Script output follows + + $Id$ + bar + +(check expansion again, for safety) + + $ get-with-headers.py localhost:$HGPORT 'enabled/file/tip/m/?style=raw' + 200 Script output follows + + $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $ + bar + + $ killdaemons.py +#endif