Mercurial > hg
changeset 33066:cf0da12afe8a
keyword: add test for keyword expansion at serving multiple repositories
This is safety for subsequent (and future) patches, which change
function wrapping.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Mon, 26 Jun 2017 03:40:57 +0900 |
parents | 0afdc1a4f925 |
children | 5a51db8bf41b |
files | tests/test-keyword.t |
diffstat | 1 files changed, 44 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-keyword.t Mon Jun 26 03:40:12 2017 +0900 +++ b/tests/test-keyword.t Mon Jun 26 03:40:57 2017 +0900 @@ -1097,6 +1097,7 @@ xxx $ $Xinfo: User Name <user@example.com>: firstline $ + $ killdaemons.py $ cat errors.log #endif @@ -1429,3 +1430,46 @@ 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 <<EOF + > [extensions] + > keyword = ! + > EOF + + $ cat > paths.conf <<EOF + > [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