Mercurial > hg-stable
diff tests/test-hgwebdir @ 7523:e60aaae83323
hgweb: recurse down collections only if ** in [paths]
collections: direct child repos only
paths *: direct child repos only (like collections)
paths **: recursive discovery
When ** is used, the mq repository (if any) is also shown.
author | Benoit Allard <benoit@aeteurope.nl> |
---|---|
date | Thu, 18 Dec 2008 22:32:48 +0100 |
parents | 85dc88630beb |
children | d895158fe8af |
line wrap: on
line diff
--- a/tests/test-hgwebdir Mon Dec 15 12:02:18 2008 -0800 +++ b/tests/test-hgwebdir Thu Dec 18 22:32:48 2008 +0100 @@ -8,16 +8,25 @@ hg init a echo a > a/a hg --cwd a ci -Ama -d'1 0' +# create a mercurial queue repository +hg --cwd a qinit --config extensions.hgext.mq= -c hg init b echo b > b/b hg --cwd b ci -Amb -d'2 0' +# create a nested repository +cd b +hg init d +echo d > d/d +hg --cwd d ci -Amd -d'3 0' +cd .. + hg init c echo c > c/c hg --cwd c ci -Amc -d'3 0' + root=`pwd` - cd .. cat > paths.conf <<EOF @@ -46,6 +55,7 @@ t/a/=$root/a b=$root/b coll=$root/* +rcoll=$root/** EOF hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ @@ -64,6 +74,10 @@ # Test [paths] '*' extension "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/?style=raw' "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw' +#test [paths] '**' extension +"$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw' +"$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw' + cat > collections.conf <<EOF [collections] @@ -74,7 +88,7 @@ -A access-collections.log -E error-collections.log cat hg.pid >> $DAEMON_PIDS -echo % should succeed +echo % collections: should succeed "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw' "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw' "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/file/tip/b?style=raw'