comparison tests/test-hgwebdir.t @ 12443:8dfdf0219494

tests: unify test-hgwebdir
author Matt Mackall <mpm@selenic.com>
date Sun, 26 Sep 2010 13:41:32 -0500
parents tests/test-hgwebdir@9617803b1acb
children d08bb64888bc
comparison
equal deleted inserted replaced
12442:b7fd332e5ca2 12443:8dfdf0219494
1 Tests some basic hgwebdir functionality. Tests setting up paths and
2 collection, different forms of 404s and the subdirectory support.
3
4 $ mkdir webdir
5 $ cd webdir
6 $ hg init a
7 $ echo a > a/a
8 $ hg --cwd a ci -Ama -d'1 0'
9 adding a
10
11 create a mercurial queue repository
12
13 $ hg --cwd a qinit --config extensions.hgext.mq= -c
14 $ hg init b
15 $ echo b > b/b
16 $ hg --cwd b ci -Amb -d'2 0'
17 adding b
18
19 create a nested repository
20
21 $ cd b
22 $ hg init d
23 $ echo d > d/d
24 $ hg --cwd d ci -Amd -d'3 0'
25 adding d
26 $ cd ..
27 $ hg init c
28 $ echo c > c/c
29 $ hg --cwd c ci -Amc -d'3 0'
30 adding c
31
32 create repository without .hg/store
33
34 $ hg init nostore
35 $ rm -R nostore/.hg/store
36 $ root=`pwd`
37 $ cd ..
38 $ cat > paths.conf <<EOF
39 > [paths]
40 > a=$root/a
41 > b=$root/b
42 > EOF
43 $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf paths.conf \
44 > -A access-paths.log -E error-paths-1.log
45 $ cat hg.pid >> $DAEMON_PIDS
46
47 should give a 404 - file does not exist
48
49 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/bork?style=raw'
50 404 Not Found
51
52
53 error: bork@8580ff50825a: not found in manifest
54 [1]
55
56 should succeed
57
58 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw'
59 200 Script output follows
60
61
62 /a/
63 /b/
64
65 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/a?style=raw'
66 200 Script output follows
67
68 a
69 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw'
70 200 Script output follows
71
72 b
73
74 should give a 404 - repo is not published
75
76 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw'
77 404 Not Found
78
79
80 error: repository c not found
81 [1]
82
83 atom-log without basedir
84
85 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/atom-log' | grep '<link'
86 <link rel="self" href="http://*/a/atom-log"/> (glob)
87 <link rel="alternate" href="http://*/a/"/> (glob)
88 <link href="http://*/a/rev/8580ff50825a"/> (glob)
89
90 rss-log without basedir
91
92 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/rss-log' | grep '<guid'
93 <guid isPermaLink="true">http://*/a/rev/8580ff50825a</guid> (glob)
94 $ cat > paths.conf <<EOF
95 > [paths]
96 > t/a/=$root/a
97 > b=$root/b
98 > coll=$root/*
99 > rcoll=$root/**
100 > star=*
101 > starstar=**
102 > EOF
103 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
104 > -A access-paths.log -E error-paths-2.log
105 $ cat hg.pid >> $DAEMON_PIDS
106
107 should succeed, slashy names
108
109 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
110 200 Script output follows
111
112
113 /t/a/
114 /b/
115 /coll/a/
116 /coll/a/.hg/patches/
117 /coll/b/
118 /coll/c/
119 /rcoll/a/
120 /rcoll/a/.hg/patches/
121 /rcoll/b/
122 /rcoll/b/d/
123 /rcoll/c/
124 /star/webdir/a/
125 /star/webdir/a/.hg/patches/
126 /star/webdir/b/
127 /star/webdir/c/
128 /starstar/webdir/a/
129 /starstar/webdir/a/.hg/patches/
130 /starstar/webdir/b/
131 /starstar/webdir/b/d/
132 /starstar/webdir/c/
133
134 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=paper'
135 200 Script output follows
136
137 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
138 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
139 <head>
140 <link rel="icon" href="/static/hgicon.png" type="image/png" />
141 <meta name="robots" content="index, nofollow" />
142 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
143
144 <title>Mercurial repositories index</title>
145 </head>
146 <body>
147
148 <div class="container">
149 <div class="menu">
150 <a href="http://mercurial.selenic.com/">
151 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
152 </div>
153 <div class="main">
154 <h2>Mercurial Repositories</h2>
155
156 <table class="bigtable">
157 <tr>
158 <th><a href="?sort=name">Name</a></th>
159 <th><a href="?sort=description">Description</a></th>
160 <th><a href="?sort=contact">Contact</a></th>
161 <th><a href="?sort=lastchange">Last modified</a></th>
162 <th>&nbsp;</th>
163 </tr>
164
165 <tr class="parity0">
166 <td><a href="/t/a/?style=paper">t/a</a></td>
167 <td>unknown</td>
168 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
169 <td class="age">* ago</td> (glob)
170 <td class="indexlinks"></td>
171 </tr>
172
173 <tr class="parity1">
174 <td><a href="/b/?style=paper">b</a></td>
175 <td>unknown</td>
176 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
177 <td class="age">* ago</td> (glob)
178 <td class="indexlinks"></td>
179 </tr>
180
181 <tr class="parity0">
182 <td><a href="/coll/a/?style=paper">coll/a</a></td>
183 <td>unknown</td>
184 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
185 <td class="age">* ago</td> (glob)
186 <td class="indexlinks"></td>
187 </tr>
188
189 <tr class="parity1">
190 <td><a href="/coll/a/.hg/patches/?style=paper">coll/a/.hg/patches</a></td>
191 <td>unknown</td>
192 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
193 <td class="age">* ago</td> (glob)
194 <td class="indexlinks"></td>
195 </tr>
196
197 <tr class="parity0">
198 <td><a href="/coll/b/?style=paper">coll/b</a></td>
199 <td>unknown</td>
200 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
201 <td class="age">* ago</td> (glob)
202 <td class="indexlinks"></td>
203 </tr>
204
205 <tr class="parity1">
206 <td><a href="/coll/c/?style=paper">coll/c</a></td>
207 <td>unknown</td>
208 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
209 <td class="age">* ago</td> (glob)
210 <td class="indexlinks"></td>
211 </tr>
212
213 <tr class="parity0">
214 <td><a href="/rcoll/a/?style=paper">rcoll/a</a></td>
215 <td>unknown</td>
216 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
217 <td class="age">* ago</td> (glob)
218 <td class="indexlinks"></td>
219 </tr>
220
221 <tr class="parity1">
222 <td><a href="/rcoll/a/.hg/patches/?style=paper">rcoll/a/.hg/patches</a></td>
223 <td>unknown</td>
224 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
225 <td class="age">* ago</td> (glob)
226 <td class="indexlinks"></td>
227 </tr>
228
229 <tr class="parity0">
230 <td><a href="/rcoll/b/?style=paper">rcoll/b</a></td>
231 <td>unknown</td>
232 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
233 <td class="age">* ago</td> (glob)
234 <td class="indexlinks"></td>
235 </tr>
236
237 <tr class="parity1">
238 <td><a href="/rcoll/b/d/?style=paper">rcoll/b/d</a></td>
239 <td>unknown</td>
240 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
241 <td class="age">* ago</td> (glob)
242 <td class="indexlinks"></td>
243 </tr>
244
245 <tr class="parity0">
246 <td><a href="/rcoll/c/?style=paper">rcoll/c</a></td>
247 <td>unknown</td>
248 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
249 <td class="age">* ago</td> (glob)
250 <td class="indexlinks"></td>
251 </tr>
252
253 <tr class="parity1">
254 <td><a href="/star/webdir/a/?style=paper">star/webdir/a</a></td>
255 <td>unknown</td>
256 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
257 <td class="age">* ago</td> (glob)
258 <td class="indexlinks"></td>
259 </tr>
260
261 <tr class="parity0">
262 <td><a href="/star/webdir/a/.hg/patches/?style=paper">star/webdir/a/.hg/patches</a></td>
263 <td>unknown</td>
264 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
265 <td class="age">* ago</td> (glob)
266 <td class="indexlinks"></td>
267 </tr>
268
269 <tr class="parity1">
270 <td><a href="/star/webdir/b/?style=paper">star/webdir/b</a></td>
271 <td>unknown</td>
272 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
273 <td class="age">* ago</td> (glob)
274 <td class="indexlinks"></td>
275 </tr>
276
277 <tr class="parity0">
278 <td><a href="/star/webdir/c/?style=paper">star/webdir/c</a></td>
279 <td>unknown</td>
280 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
281 <td class="age">* ago</td> (glob)
282 <td class="indexlinks"></td>
283 </tr>
284
285 <tr class="parity1">
286 <td><a href="/starstar/webdir/a/?style=paper">starstar/webdir/a</a></td>
287 <td>unknown</td>
288 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
289 <td class="age">* ago</td> (glob)
290 <td class="indexlinks"></td>
291 </tr>
292
293 <tr class="parity0">
294 <td><a href="/starstar/webdir/a/.hg/patches/?style=paper">starstar/webdir/a/.hg/patches</a></td>
295 <td>unknown</td>
296 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
297 <td class="age">* ago</td> (glob)
298 <td class="indexlinks"></td>
299 </tr>
300
301 <tr class="parity1">
302 <td><a href="/starstar/webdir/b/?style=paper">starstar/webdir/b</a></td>
303 <td>unknown</td>
304 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
305 <td class="age">* ago</td> (glob)
306 <td class="indexlinks"></td>
307 </tr>
308
309 <tr class="parity0">
310 <td><a href="/starstar/webdir/b/d/?style=paper">starstar/webdir/b/d</a></td>
311 <td>unknown</td>
312 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
313 <td class="age">* ago</td> (glob)
314 <td class="indexlinks"></td>
315 </tr>
316
317 <tr class="parity1">
318 <td><a href="/starstar/webdir/c/?style=paper">starstar/webdir/c</a></td>
319 <td>unknown</td>
320 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
321 <td class="age">* ago</td> (glob)
322 <td class="indexlinks"></td>
323 </tr>
324
325 </table>
326 </div>
327 </div>
328
329
330 </body>
331 </html>
332
333 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t?style=raw'
334 200 Script output follows
335
336
337 /t/a/
338
339 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
340 200 Script output follows
341
342
343 /t/a/
344
345 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=paper'
346 200 Script output follows
347
348 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
349 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
350 <head>
351 <link rel="icon" href="/static/hgicon.png" type="image/png" />
352 <meta name="robots" content="index, nofollow" />
353 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
354
355 <title>Mercurial repositories index</title>
356 </head>
357 <body>
358
359 <div class="container">
360 <div class="menu">
361 <a href="http://mercurial.selenic.com/">
362 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
363 </div>
364 <div class="main">
365 <h2>Mercurial Repositories</h2>
366
367 <table class="bigtable">
368 <tr>
369 <th><a href="?sort=name">Name</a></th>
370 <th><a href="?sort=description">Description</a></th>
371 <th><a href="?sort=contact">Contact</a></th>
372 <th><a href="?sort=lastchange">Last modified</a></th>
373 <th>&nbsp;</th>
374 </tr>
375
376 <tr class="parity0">
377 <td><a href="/t/a/?style=paper">a</a></td>
378 <td>unknown</td>
379 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
380 <td class="age">* ago</td> (glob)
381 <td class="indexlinks"></td>
382 </tr>
383
384 </table>
385 </div>
386 </div>
387
388
389 </body>
390 </html>
391
392 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a?style=atom'
393 200 Script output follows
394
395 <?xml version="1.0" encoding="ascii"?>
396 <feed xmlns="http://www.w3.org/2005/Atom">
397 <!-- Changelog -->
398 <id>http://*/t/a/</id> (glob)
399 <link rel="self" href="http://*/t/a/atom-log"/> (glob)
400 <link rel="alternate" href="http://*/t/a/"/> (glob)
401 <title>t/a Changelog</title>
402 <updated>1970-01-01T00:00:01+00:00</updated>
403
404 <entry>
405 <title>a</title>
406 <id>http://*/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> (glob)
407 <link href="http://*/t/a/rev/8580ff50825a"/> (glob)
408 <author>
409 <name>test</name>
410 <email>&#116;&#101;&#115;&#116;</email>
411 </author>
412 <updated>1970-01-01T00:00:01+00:00</updated>
413 <published>1970-01-01T00:00:01+00:00</published>
414 <content type="xhtml">
415 <div xmlns="http://www.w3.org/1999/xhtml">
416 <pre xml:space="preserve">a</pre>
417 </div>
418 </content>
419 </entry>
420
421 </feed>
422 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/?style=atom'
423 200 Script output follows
424
425 <?xml version="1.0" encoding="ascii"?>
426 <feed xmlns="http://www.w3.org/2005/Atom">
427 <!-- Changelog -->
428 <id>http://*/t/a/</id> (glob)
429 <link rel="self" href="http://*/t/a/atom-log"/> (glob)
430 <link rel="alternate" href="http://*/t/a/"/> (glob)
431 <title>t/a Changelog</title>
432 <updated>1970-01-01T00:00:01+00:00</updated>
433
434 <entry>
435 <title>a</title>
436 <id>http://*/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> (glob)
437 <link href="http://*/t/a/rev/8580ff50825a"/> (glob)
438 <author>
439 <name>test</name>
440 <email>&#116;&#101;&#115;&#116;</email>
441 </author>
442 <updated>1970-01-01T00:00:01+00:00</updated>
443 <published>1970-01-01T00:00:01+00:00</published>
444 <content type="xhtml">
445 <div xmlns="http://www.w3.org/1999/xhtml">
446 <pre xml:space="preserve">a</pre>
447 </div>
448 </content>
449 </entry>
450
451 </feed>
452 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/file/tip/a?style=raw'
453 200 Script output follows
454
455 a
456
457 Test [paths] '*' extension
458
459 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/?style=raw'
460 200 Script output follows
461
462
463 /coll/a/
464 /coll/a/.hg/patches/
465 /coll/b/
466 /coll/c/
467
468 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw'
469 200 Script output follows
470
471 a
472
473 est [paths] '**' extension
474
475 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw'
476 200 Script output follows
477
478
479 /rcoll/a/
480 /rcoll/a/.hg/patches/
481 /rcoll/b/
482 /rcoll/b/d/
483 /rcoll/c/
484
485 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw'
486 200 Script output follows
487
488 d
489 $ "$TESTDIR/killdaemons.py"
490 $ cat > paths.conf <<EOF
491 > [paths]
492 > t/a = $root/a
493 > t/b = $root/b
494 > c = $root/c
495 > [web]
496 > descend=false
497 > EOF
498 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
499 > -A access-paths.log -E error-paths-3.log
500 $ cat hg.pid >> $DAEMON_PIDS
501
502 test descend = False
503
504 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
505 200 Script output follows
506
507
508 /c/
509
510 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
511 200 Script output follows
512
513
514 /t/a/
515 /t/b/
516
517 $ "$TESTDIR/killdaemons.py"
518 $ cat > paths.conf <<EOF
519 > [paths]
520 > nostore = $root/nostore
521 > inexistent = $root/inexistent
522 > EOF
523 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
524 > -A access-paths.log -E error-paths-4.log
525 $ cat hg.pid >> $DAEMON_PIDS
526
527 test inexistent and inaccessible repo should be ignored silently
528
529 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/'
530 200 Script output follows
531
532 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
533 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
534 <head>
535 <link rel="icon" href="/static/hgicon.png" type="image/png" />
536 <meta name="robots" content="index, nofollow" />
537 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
538
539 <title>Mercurial repositories index</title>
540 </head>
541 <body>
542
543 <div class="container">
544 <div class="menu">
545 <a href="http://mercurial.selenic.com/">
546 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
547 </div>
548 <div class="main">
549 <h2>Mercurial Repositories</h2>
550
551 <table class="bigtable">
552 <tr>
553 <th><a href="?sort=name">Name</a></th>
554 <th><a href="?sort=description">Description</a></th>
555 <th><a href="?sort=contact">Contact</a></th>
556 <th><a href="?sort=lastchange">Last modified</a></th>
557 <th>&nbsp;</th>
558 </tr>
559
560 </table>
561 </div>
562 </div>
563
564
565 </body>
566 </html>
567
568 $ cat > collections.conf <<EOF
569 > [collections]
570 > $root=$root
571 > EOF
572 $ hg serve --config web.baseurl=http://hg.example.com:8080/ -p $HGPORT2 -d \
573 > --pid-file=hg.pid --webdir-conf collections.conf \
574 > -A access-collections.log -E error-collections.log
575 $ cat hg.pid >> $DAEMON_PIDS
576
577 collections: should succeed
578
579 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw'
580 200 Script output follows
581
582
583 /a/
584 /a/.hg/patches/
585 /b/
586 /c/
587
588 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw'
589 200 Script output follows
590
591 a
592 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/file/tip/b?style=raw'
593 200 Script output follows
594
595 b
596 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/c/file/tip/c?style=raw'
597 200 Script output follows
598
599 c
600
601 atom-log with basedir /
602
603 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' | grep '<link'
604 <link rel="self" href="http://hg.example.com:8080/a/atom-log"/>
605 <link rel="alternate" href="http://hg.example.com:8080/a/"/>
606 <link href="http://hg.example.com:8080/a/rev/8580ff50825a"/>
607
608 rss-log with basedir /
609
610 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' | grep '<guid'
611 <guid isPermaLink="true">http://hg.example.com:8080/a/rev/8580ff50825a</guid>
612 $ "$TESTDIR/killdaemons.py"
613 $ hg serve --config web.baseurl=http://hg.example.com:8080/foo/ -p $HGPORT2 -d \
614 > --pid-file=hg.pid --webdir-conf collections.conf \
615 > -A access-collections-2.log -E error-collections-2.log
616 $ cat hg.pid >> $DAEMON_PIDS
617
618 atom-log with basedir /foo/
619
620 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' | grep '<link'
621 <link rel="self" href="http://hg.example.com:8080/foo/a/atom-log"/>
622 <link rel="alternate" href="http://hg.example.com:8080/foo/a/"/>
623 <link href="http://hg.example.com:8080/foo/a/rev/8580ff50825a"/>
624
625 rss-log with basedir /foo/
626
627 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' | grep '<guid'
628 <guid isPermaLink="true">http://hg.example.com:8080/foo/a/rev/8580ff50825a</guid>
629
630 paths errors 1
631
632 $ cat error-paths-1.log
633
634 paths errors 2
635
636 $ cat error-paths-2.log
637
638 paths errors 3
639
640 $ cat error-paths-3.log
641
642 collections errors
643
644 $ cat error-collections.log
645
646 collections errors 2
647
648 $ cat error-collections-2.log