Mercurial > hg
comparison tests/test-hgwebdir @ 12038:9617803b1acb stable
hgweb: handle exception of misconfigured path on index page
If hgweb.config contains wrong path mapping, hgweb causes internal server
error on repository index page.
This patch changes makeindex() to ignore RepoError, because it looks to be
designed to suppress configuration error.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Tue, 24 Aug 2010 23:30:51 +0900 |
parents | 8f8a7976f4bc |
children |
comparison
equal
deleted
inserted
replaced
12030:927d63be166b | 12038:9617803b1acb |
---|---|
23 cd .. | 23 cd .. |
24 | 24 |
25 hg init c | 25 hg init c |
26 echo c > c/c | 26 echo c > c/c |
27 hg --cwd c ci -Amc -d'3 0' | 27 hg --cwd c ci -Amc -d'3 0' |
28 | |
29 # create repository without .hg/store | |
30 hg init nostore | |
31 rm -R nostore/.hg/store | |
28 | 32 |
29 root=`pwd` | 33 root=`pwd` |
30 cd .. | 34 cd .. |
31 | 35 |
32 | 36 |
110 echo % test descend = False | 114 echo % test descend = False |
111 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' | 115 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' |
112 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw' | 116 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw' |
113 | 117 |
114 | 118 |
119 "$TESTDIR/killdaemons.py" | |
120 cat > paths.conf <<EOF | |
121 [paths] | |
122 nostore = $root/nostore | |
123 inexistent = $root/inexistent | |
124 EOF | |
125 | |
126 hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ | |
127 -A access-paths.log -E error-paths-4.log | |
128 cat hg.pid >> $DAEMON_PIDS | |
129 echo % test inexistent and inaccessible repo should be ignored silently | |
130 "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/' | |
131 | |
132 | |
115 cat > collections.conf <<EOF | 133 cat > collections.conf <<EOF |
116 [collections] | 134 [collections] |
117 $root=$root | 135 $root=$root |
118 EOF | 136 EOF |
119 | 137 |