#require serve hide outer repo and work in dir without '.hg' $ hg init $ mkdir dir $ cd dir Tests some basic hgwebdir functionality. Tests setting up paths and collection, different forms of 404s and the subdirectory support. $ mkdir webdir $ cd webdir $ hg init a $ echo a > a/a $ hg --cwd a ci -Ama -d'1 0' adding a 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' adding b create a nested repository $ cd b $ hg init d $ echo d > d/d $ hg --cwd d ci -Amd -d'3 0' adding d $ cd .. $ hg init c $ echo c > c/c $ hg --cwd c ci -Amc -d'3 0' adding c create a subdirectory containing repositories and subrepositories $ mkdir notrepo $ cd notrepo $ hg init e $ echo e > e/e $ hg --cwd e ci -Ame -d'4 0' adding e $ hg init e/e2 $ echo e2 > e/e2/e2 $ hg --cwd e/e2 ci -Ame2 -d '4 0' adding e2 $ hg init f $ echo f > f/f $ hg --cwd f ci -Amf -d'4 0' adding f $ hg init f/f2 $ echo f2 > f/f2/f2 $ hg --cwd f/f2 ci -Amf2 -d '4 0' adding f2 $ echo 'f2 = f2' > f/.hgsub $ hg -R f ci -Am 'add subrepo' -d'4 0' adding .hgsub $ cat >> f/.hg/hgrc << EOF > [web] > name = fancy name for repo f > labels = foo, bar > EOF $ cd .. create repository without .hg/store $ hg init nostore $ rm -R nostore/.hg/store $ root=`pwd` $ cd .. serve $ cat > paths.conf < [paths] > a=$root/a > b=$root/b > EOF $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf paths.conf \ > -A access-paths.log -E error-paths-1.log $ cat hg.pid >> $DAEMON_PIDS should give a 404 - file does not exist $ get-with-headers.py localhost:$HGPORT 'a/file/tip/bork?style=raw' 404 Not Found error: bork@8580ff50825a: not found in manifest [1] should succeed $ get-with-headers.py localhost:$HGPORT '?style=raw' 200 Script output follows /a/ /b/ $ get-with-headers.py localhost:$HGPORT '?style=json' 200 Script output follows { "entries": [{ "name": "a", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "b", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }] } (no-eol) $ get-with-headers.py localhost:$HGPORT 'a/file/tip/a?style=raw' 200 Script output follows a $ get-with-headers.py localhost:$HGPORT 'b/file/tip/b?style=raw' 200 Script output follows b should give a 404 - repo is not published $ get-with-headers.py localhost:$HGPORT 'c/file/tip/c?style=raw' 404 Not Found error: repository c/file/tip/c not found [1] atom-log without basedir $ get-with-headers.py localhost:$HGPORT 'a/atom-log' | grep ' (glob) (glob) (glob) rss-log without basedir $ get-with-headers.py localhost:$HGPORT 'a/rss-log' | grep 'http://*:$HGPORT/a/rev/8580ff50825a (glob) $ cat > paths.conf < [paths] > t/a/=$root/a > b=$root/b > coll=$root/* > rcoll=$root/** > star=* > starstar=** > astar=webdir/a/* > EOF $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ > -A access-paths.log -E error-paths-2.log $ cat hg.pid >> $DAEMON_PIDS should succeed, slashy names $ get-with-headers.py localhost:$HGPORT1 '?style=raw' 200 Script output follows /t/a/ /b/ /coll/a/ /coll/a/.hg/patches/ /coll/b/ /coll/c/ /coll/notrepo/e/ /coll/notrepo/f/ /rcoll/a/ /rcoll/a/.hg/patches/ /rcoll/b/ /rcoll/b/d/ /rcoll/c/ /rcoll/notrepo/e/ /rcoll/notrepo/e/e2/ /rcoll/notrepo/f/ /rcoll/notrepo/f/f2/ /star/webdir/a/ /star/webdir/a/.hg/patches/ /star/webdir/b/ /star/webdir/c/ /star/webdir/notrepo/e/ /star/webdir/notrepo/f/ /starstar/webdir/a/ /starstar/webdir/a/.hg/patches/ /starstar/webdir/b/ /starstar/webdir/b/d/ /starstar/webdir/c/ /starstar/webdir/notrepo/e/ /starstar/webdir/notrepo/e/e2/ /starstar/webdir/notrepo/f/ /starstar/webdir/notrepo/f/f2/ /astar/ /astar/.hg/patches/ $ get-with-headers.py localhost:$HGPORT1 '?style=json' 200 Script output follows { "entries": [{ "name": "t/a", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "b", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "coll/a", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "coll/a/.hg/patches", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "coll/b", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "coll/c", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "coll/notrepo/e", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "fancy name for repo f", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": ["foo", "bar"] }, { "name": "rcoll/a", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "rcoll/a/.hg/patches", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "rcoll/b", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "rcoll/b/d", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "rcoll/c", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "rcoll/notrepo/e", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "rcoll/notrepo/e/e2", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "fancy name for repo f", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": ["foo", "bar"] }, { "name": "rcoll/notrepo/f/f2", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "star/webdir/a", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "star/webdir/a/.hg/patches", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "star/webdir/b", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "star/webdir/c", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "star/webdir/notrepo/e", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "fancy name for repo f", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": ["foo", "bar"] }, { "name": "starstar/webdir/a", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "starstar/webdir/a/.hg/patches", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "starstar/webdir/b", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "starstar/webdir/b/d", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "starstar/webdir/c", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "starstar/webdir/notrepo/e", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "starstar/webdir/notrepo/e/e2", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "fancy name for repo f", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": ["foo", "bar"] }, { "name": "starstar/webdir/notrepo/f/f2", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "astar", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }, { "name": "astar/.hg/patches", "description": "unknown", "contact": "Foo Bar \u003cfoo.bar@example.com\u003e", "lastchange": [*, *], (glob) "labels": [] }] } (no-eol) $ get-with-headers.py localhost:$HGPORT1 '?style=paper' 200 Script output follows Mercurial repositories index
(glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob) (glob)
Name Description Contact Last modified    
t/a unknown Foo Bar <foo.bar@example.com> *
b unknown Foo Bar <foo.bar@example.com> *
coll/a unknown Foo Bar <foo.bar@example.com> *
coll/a/.hg/patches unknown Foo Bar <foo.bar@example.com> *
coll/b unknown Foo Bar <foo.bar@example.com> *
coll/c unknown Foo Bar <foo.bar@example.com> *
coll/notrepo/e unknown Foo Bar <foo.bar@example.com> *
fancy name for repo f unknown Foo Bar <foo.bar@example.com> *
rcoll/a unknown Foo Bar <foo.bar@example.com> *
rcoll/a/.hg/patches unknown Foo Bar <foo.bar@example.com> *
rcoll/b unknown Foo Bar <foo.bar@example.com> *
rcoll/b/d unknown Foo Bar <foo.bar@example.com> *
rcoll/c unknown Foo Bar <foo.bar@example.com> *
rcoll/notrepo/e unknown Foo Bar <foo.bar@example.com> *
rcoll/notrepo/e/e2 unknown Foo Bar <foo.bar@example.com> *
fancy name for repo f unknown Foo Bar <foo.bar@example.com> *
rcoll/notrepo/f/f2 unknown Foo Bar <foo.bar@example.com> *
star/webdir/a unknown Foo Bar <foo.bar@example.com> *
star/webdir/a/.hg/patches unknown Foo Bar <foo.bar@example.com> *
star/webdir/b unknown Foo Bar <foo.bar@example.com> *
star/webdir/c unknown Foo Bar <foo.bar@example.com> *
star/webdir/notrepo/e unknown Foo Bar <foo.bar@example.com> *
fancy name for repo f unknown Foo Bar <foo.bar@example.com> *
starstar/webdir/a unknown Foo Bar <foo.bar@example.com> *
starstar/webdir/a/.hg/patches unknown Foo Bar <foo.bar@example.com> *
starstar/webdir/b unknown Foo Bar <foo.bar@example.com> *
starstar/webdir/b/d unknown Foo Bar <foo.bar@example.com> *
starstar/webdir/c unknown Foo Bar <foo.bar@example.com> *
starstar/webdir/notrepo/e unknown Foo Bar <foo.bar@example.com> *
starstar/webdir/notrepo/e/e2 unknown Foo Bar <foo.bar@example.com> *
fancy name for repo f unknown Foo Bar <foo.bar@example.com> *
starstar/webdir/notrepo/f/f2 unknown Foo Bar <foo.bar@example.com> *
astar unknown Foo Bar <foo.bar@example.com> *
astar/.hg/patches unknown Foo Bar <foo.bar@example.com> *
$ get-with-headers.py localhost:$HGPORT1 't?style=raw' 200 Script output follows /t/a/ $ get-with-headers.py localhost:$HGPORT1 't/?style=raw' 200 Script output follows /t/a/ $ get-with-headers.py localhost:$HGPORT1 't/?style=paper' 200 Script output follows Mercurial repositories index
(glob)
Name Description Contact Last modified    
a unknown Foo Bar <foo.bar@example.com> *
$ get-with-headers.py localhost:$HGPORT1 't/a?style=atom' 200 Script output follows http://*:$HGPORT1/t/a/ (glob) (glob) (glob) t/a Changelog 1970-01-01T00:00:01+00:00 [default] a http://*:$HGPORT1/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab (glob) (glob) test test 1970-01-01T00:00:01+00:00 1970-01-01T00:00:01+00:00
changeset 8580ff50825a
branch default
bookmark
tag tip
user test
description a
files a
$ get-with-headers.py localhost:$HGPORT1 't/a/?style=atom' 200 Script output follows http://*:$HGPORT1/t/a/ (glob) (glob) (glob) t/a Changelog 1970-01-01T00:00:01+00:00 [default] a http://*:$HGPORT1/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab (glob) (glob) test test 1970-01-01T00:00:01+00:00 1970-01-01T00:00:01+00:00
changeset 8580ff50825a
branch default
bookmark
tag tip
user test
description a
files a
$ get-with-headers.py localhost:$HGPORT1 't/a/file/tip/a?style=raw' 200 Script output follows a Test [paths] '*' extension $ get-with-headers.py localhost:$HGPORT1 'coll/?style=raw' 200 Script output follows /coll/a/ /coll/a/.hg/patches/ /coll/b/ /coll/c/ /coll/notrepo/e/ /coll/notrepo/f/ $ get-with-headers.py localhost:$HGPORT1 'coll/a/file/tip/a?style=raw' 200 Script output follows a Test [paths] '**' extension $ get-with-headers.py localhost:$HGPORT1 'rcoll/?style=raw' 200 Script output follows /rcoll/a/ /rcoll/a/.hg/patches/ /rcoll/b/ /rcoll/b/d/ /rcoll/c/ /rcoll/notrepo/e/ /rcoll/notrepo/e/e2/ /rcoll/notrepo/f/ /rcoll/notrepo/f/f2/ $ get-with-headers.py localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw' 200 Script output follows d Test collapse = True $ killdaemons.py $ cat >> paths.conf < [web] > collapse=true > descend = true > EOF $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ > -A access-paths.log -E error-paths-3.log $ cat hg.pid >> $DAEMON_PIDS $ get-with-headers.py localhost:$HGPORT1 'coll/?style=raw' 200 Script output follows /coll/a/ /coll/a/.hg/patches/ /coll/b/ /coll/c/ /coll/notrepo/ $ get-with-headers.py localhost:$HGPORT1 'coll/a/file/tip/a?style=raw' 200 Script output follows a $ get-with-headers.py localhost:$HGPORT1 'rcoll/?style=raw' 200 Script output follows /rcoll/a/ /rcoll/a/.hg/patches/ /rcoll/b/ /rcoll/b/d/ /rcoll/c/ /rcoll/notrepo/ $ get-with-headers.py localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw' 200 Script output follows d Test intermediate directories Hide the subrepo parent $ cp $root/notrepo/f/.hg/hgrc $root/notrepo/f/.hg/hgrc.bak $ cat >> $root/notrepo/f/.hg/hgrc << EOF > [web] > hidden = True > EOF $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/?style=raw' 200 Script output follows /rcoll/notrepo/e/ /rcoll/notrepo/e/e2/ Subrepo parent not hidden $ mv $root/notrepo/f/.hg/hgrc.bak $root/notrepo/f/.hg/hgrc $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/?style=raw' 200 Script output follows /rcoll/notrepo/e/ /rcoll/notrepo/e/e2/ /rcoll/notrepo/f/ /rcoll/notrepo/f/f2/ Test repositories inside intermediate directories $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/e/file/tip/e?style=raw' 200 Script output follows e Test subrepositories inside intermediate directories $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/f/f2/file/tip/f2?style=raw' 200 Script output follows f2 Test descend = False $ killdaemons.py $ cat >> paths.conf < descend=false > EOF $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ > -A access-paths.log -E error-paths-4.log $ cat hg.pid >> $DAEMON_PIDS $ get-with-headers.py localhost:$HGPORT1 'coll/?style=raw' 200 Script output follows /coll/a/ /coll/b/ /coll/c/ $ get-with-headers.py localhost:$HGPORT1 'coll/a/file/tip/a?style=raw' 200 Script output follows a $ get-with-headers.py localhost:$HGPORT1 'rcoll/?style=raw' 200 Script output follows /rcoll/a/ /rcoll/b/ /rcoll/c/ $ get-with-headers.py localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw' 200 Script output follows d Test intermediate directories $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/?style=raw' 200 Script output follows /rcoll/notrepo/e/ /rcoll/notrepo/f/ Test repositories inside intermediate directories $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/e/file/tip/e?style=raw' 200 Script output follows e Test subrepositories inside intermediate directories $ get-with-headers.py localhost:$HGPORT1 'rcoll/notrepo/f/f2/file/tip/f2?style=raw' 200 Script output follows f2 Test [paths] '*' in a repo root $ hg id http://localhost:$HGPORT1/astar 8580ff50825a $ killdaemons.py $ cat > paths.conf < [paths] > t/a = $root/a > t/b = $root/b > c = $root/c > EOF $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ > -A access-paths.log -E error-paths-5.log $ cat hg.pid >> $DAEMON_PIDS $ get-with-headers.py localhost:$HGPORT1 '?style=raw' 200 Script output follows /t/a/ /t/b/ /c/ $ get-with-headers.py localhost:$HGPORT1 't/?style=raw' 200 Script output follows /t/a/ /t/b/ Test collapse = True $ killdaemons.py $ cat >> paths.conf < [web] > collapse=true > EOF $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ > -A access-paths.log -E error-paths-6.log $ cat hg.pid >> $DAEMON_PIDS $ get-with-headers.py localhost:$HGPORT1 '?style=raw' 200 Script output follows /t/ /c/ $ get-with-headers.py localhost:$HGPORT1 't/?style=raw' 200 Script output follows /t/a/ /t/b/ test descend = False $ killdaemons.py $ cat >> paths.conf < descend=false > EOF $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ > -A access-paths.log -E error-paths-7.log $ cat hg.pid >> $DAEMON_PIDS $ get-with-headers.py localhost:$HGPORT1 '?style=raw' 200 Script output follows /c/ $ get-with-headers.py localhost:$HGPORT1 't/?style=raw' 200 Script output follows /t/a/ /t/b/ $ killdaemons.py $ cat > paths.conf < [paths] > nostore = $root/nostore > inexistent = $root/inexistent > EOF $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ > -A access-paths.log -E error-paths-8.log $ cat hg.pid >> $DAEMON_PIDS test inexistent and inaccessible repo should be ignored silently $ get-with-headers.py localhost:$HGPORT1 '' 200 Script output follows Mercurial repositories index test listening address/port specified by web-conf (issue4699): $ killdaemons.py $ cat >> paths.conf < [web] > address = localhost > port = $HGPORT1 > EOF $ hg serve -d --pid-file=hg.pid --web-conf paths.conf \ > -A access-paths.log -E error-paths-9.log listening at http://*:$HGPORT1/ (bound to *$LOCALIP*:$HGPORT1) (glob) $ cat hg.pid >> $DAEMON_PIDS $ get-with-headers.py localhost:$HGPORT1 '?style=raw' 200 Script output follows test --port option overrides web.port: $ killdaemons.py $ hg serve -p $HGPORT2 -d -v --pid-file=hg.pid --web-conf paths.conf \ > -A access-paths.log -E error-paths-10.log listening at http://*:$HGPORT2/ (bound to *$LOCALIP*:$HGPORT2) (glob) $ cat hg.pid >> $DAEMON_PIDS $ get-with-headers.py localhost:$HGPORT2 '?style=raw' 200 Script output follows $ killdaemons.py $ cat > collections.conf < [collections] > $root=$root > EOF $ hg serve --config web.baseurl=http://hg.example.com:8080/ -p $HGPORT2 -d \ > --pid-file=hg.pid --webdir-conf collections.conf \ > -A access-collections.log -E error-collections.log $ cat hg.pid >> $DAEMON_PIDS collections: should succeed $ get-with-headers.py localhost:$HGPORT2 '?style=raw' 200 Script output follows /a/ /a/.hg/patches/ /b/ /c/ /notrepo/e/ /notrepo/f/ $ get-with-headers.py localhost:$HGPORT2 'a/file/tip/a?style=raw' 200 Script output follows a $ get-with-headers.py localhost:$HGPORT2 'b/file/tip/b?style=raw' 200 Script output follows b $ get-with-headers.py localhost:$HGPORT2 'c/file/tip/c?style=raw' 200 Script output follows c atom-log with basedir / $ get-with-headers.py localhost:$HGPORT2 'a/atom-log' | grep ' rss-log with basedir / $ get-with-headers.py localhost:$HGPORT2 'a/rss-log' | grep 'http://hg.example.com:8080/a/rev/8580ff50825a $ killdaemons.py $ hg serve --config web.baseurl=http://hg.example.com:8080/foo/ -p $HGPORT2 -d \ > --pid-file=hg.pid --webdir-conf collections.conf \ > -A access-collections-2.log -E error-collections-2.log $ cat hg.pid >> $DAEMON_PIDS atom-log with basedir /foo/ $ get-with-headers.py localhost:$HGPORT2 'a/atom-log' | grep ' rss-log with basedir /foo/ $ get-with-headers.py localhost:$HGPORT2 'a/rss-log' | grep 'http://hg.example.com:8080/foo/a/rev/8580ff50825a Path refreshing works as expected $ killdaemons.py $ mkdir $root/refreshtest $ hg init $root/refreshtest/a $ cat > paths.conf << EOF > [paths] > / = $root/refreshtest/* > EOF $ hg serve -p $HGPORT1 -d --pid-file hg.pid --webdir-conf paths.conf $ cat hg.pid >> $DAEMON_PIDS $ get-with-headers.py localhost:$HGPORT1 '?style=raw' 200 Script output follows /a/ By default refreshing occurs every 20s and a new repo won't be listed immediately. $ hg init $root/refreshtest/b $ get-with-headers.py localhost:$HGPORT1 '?style=raw' 200 Script output follows /a/ Restart the server with no refresh interval. New repo should appear immediately. $ killdaemons.py $ cat > paths.conf << EOF > [web] > refreshinterval = -1 > [paths] > / = $root/refreshtest/* > EOF $ hg serve -p $HGPORT1 -d --pid-file hg.pid --webdir-conf paths.conf $ cat hg.pid >> $DAEMON_PIDS $ get-with-headers.py localhost:$HGPORT1 '?style=raw' 200 Script output follows /a/ /b/ $ hg init $root/refreshtest/c $ get-with-headers.py localhost:$HGPORT1 '?style=raw' 200 Script output follows /a/ /b/ /c/ paths errors 1 $ cat error-paths-1.log paths errors 2 $ cat error-paths-2.log paths errors 3 $ cat error-paths-3.log paths errors 4 $ cat error-paths-4.log paths errors 5 $ cat error-paths-5.log paths errors 6 $ cat error-paths-6.log paths errors 7 $ cat error-paths-7.log paths errors 8 $ cat error-paths-8.log paths errors 9 $ cat error-paths-9.log paths errors 10 $ cat error-paths-10.log collections errors $ cat error-collections.log collections errors 2 $ cat error-collections-2.log