##// END OF EJS Templates
hgweb: support multi-level repository indexes by enabling descend and collapse...
Paul Boddie -
r16239:287f76b3 default
parent child Browse files
Show More
@@ -245,12 +245,67 b' class hgwebdir(object):'
245 def rawentries(subdir="", **map):
245 def rawentries(subdir="", **map):
246
246
247 descend = self.ui.configbool('web', 'descend', True)
247 descend = self.ui.configbool('web', 'descend', True)
248 collapse = self.ui.configbool('web', 'collapse', False)
249 seenrepos = set()
250 seendirs = set()
248 for name, path in self.repos:
251 for name, path in self.repos:
249
252
250 if not name.startswith(subdir):
253 if not name.startswith(subdir):
251 continue
254 continue
252 name = name[len(subdir):]
255 name = name[len(subdir):]
253 if not descend and '/' in name:
256 directory = False
257
258 if '/' in name:
259 if not descend:
260 continue
261
262 nameparts = name.split('/')
263 rootname = nameparts[0]
264
265 if not collapse:
266 pass
267 elif rootname in seendirs:
268 continue
269 elif rootname in seenrepos:
270 pass
271 else:
272 directory = True
273 name = rootname
274
275 # redefine the path to refer to the directory
276 discarded = '/'.join(nameparts[1:])
277
278 # remove name parts plus accompanying slash
279 path = path[:-len(discarded) - 1]
280
281 parts = [name]
282 if 'PATH_INFO' in req.env:
283 parts.insert(0, req.env['PATH_INFO'].rstrip('/'))
284 if req.env['SCRIPT_NAME']:
285 parts.insert(0, req.env['SCRIPT_NAME'])
286 url = re.sub(r'/+', '/', '/'.join(parts) + '/')
287
288 # show either a directory entry or a repository
289 if directory:
290 # get the directory's time information
291 try:
292 d = (get_mtime(path), util.makedate()[1])
293 except OSError:
294 continue
295
296 row = dict(contact="",
297 contact_sort="",
298 name=name,
299 name_sort=name,
300 url=url,
301 description="",
302 description_sort="",
303 lastchange=d,
304 lastchange_sort=d[1]-d[0],
305 archives=[])
306
307 seendirs.add(name)
308 yield row
254 continue
309 continue
255
310
256 u = self.ui.copy()
311 u = self.ui.copy()
@@ -268,13 +323,6 b' class hgwebdir(object):'
268 if not self.read_allowed(u, req):
323 if not self.read_allowed(u, req):
269 continue
324 continue
270
325
271 parts = [name]
272 if 'PATH_INFO' in req.env:
273 parts.insert(0, req.env['PATH_INFO'].rstrip('/'))
274 if req.env['SCRIPT_NAME']:
275 parts.insert(0, req.env['SCRIPT_NAME'])
276 url = re.sub(r'/+', '/', '/'.join(parts) + '/')
277
278 # update time with local timezone
326 # update time with local timezone
279 try:
327 try:
280 r = hg.repository(self.ui, path)
328 r = hg.repository(self.ui, path)
@@ -302,6 +350,8 b' class hgwebdir(object):'
302 lastchange=d,
350 lastchange=d,
303 lastchange_sort=d[1]-d[0],
351 lastchange_sort=d[1]-d[0],
304 archives=archivelist(u, "tip", url))
352 archives=archivelist(u, "tip", url))
353
354 seenrepos.add(name)
305 yield row
355 yield row
306
356
307 sortdefault = None, False
357 sortdefault = None, False
@@ -31,6 +31,28 b' create a nested repository'
31 $ hg --cwd c ci -Amc -d'3 0'
31 $ hg --cwd c ci -Amc -d'3 0'
32 adding c
32 adding c
33
33
34 create a subdirectory containing repositories and subrepositories
35
36 $ mkdir notrepo
37 $ cd notrepo
38 $ hg init e
39 $ echo e > e/e
40 $ hg --cwd e ci -Ame -d'4 0'
41 adding e
42 $ hg init e/e2
43 $ echo e2 > e/e2/e2
44 $ hg --cwd e/e2 ci -Ame2 -d '4 0'
45 adding e2
46 $ hg init f
47 $ echo f > f/f
48 $ hg --cwd f ci -Amf -d'4 0'
49 adding f
50 $ hg init f/f2
51 $ echo f2 > f/f2/f2
52 $ hg --cwd f/f2 ci -Amf2 -d '4 0'
53 adding f2
54 $ cd ..
55
34 create repository without .hg/store
56 create repository without .hg/store
35
57
36 $ hg init nostore
58 $ hg init nostore
@@ -119,20 +141,32 b' should succeed, slashy names'
119 /coll/a/.hg/patches/
141 /coll/a/.hg/patches/
120 /coll/b/
142 /coll/b/
121 /coll/c/
143 /coll/c/
144 /coll/notrepo/e/
145 /coll/notrepo/f/
122 /rcoll/a/
146 /rcoll/a/
123 /rcoll/a/.hg/patches/
147 /rcoll/a/.hg/patches/
124 /rcoll/b/
148 /rcoll/b/
125 /rcoll/b/d/
149 /rcoll/b/d/
126 /rcoll/c/
150 /rcoll/c/
151 /rcoll/notrepo/e/
152 /rcoll/notrepo/e/e2/
153 /rcoll/notrepo/f/
154 /rcoll/notrepo/f/f2/
127 /star/webdir/a/
155 /star/webdir/a/
128 /star/webdir/a/.hg/patches/
156 /star/webdir/a/.hg/patches/
129 /star/webdir/b/
157 /star/webdir/b/
130 /star/webdir/c/
158 /star/webdir/c/
159 /star/webdir/notrepo/e/
160 /star/webdir/notrepo/f/
131 /starstar/webdir/a/
161 /starstar/webdir/a/
132 /starstar/webdir/a/.hg/patches/
162 /starstar/webdir/a/.hg/patches/
133 /starstar/webdir/b/
163 /starstar/webdir/b/
134 /starstar/webdir/b/d/
164 /starstar/webdir/b/d/
135 /starstar/webdir/c/
165 /starstar/webdir/c/
166 /starstar/webdir/notrepo/e/
167 /starstar/webdir/notrepo/e/e2/
168 /starstar/webdir/notrepo/f/
169 /starstar/webdir/notrepo/f/f2/
136 /astar/
170 /astar/
137 /astar/.hg/patches/
171 /astar/.hg/patches/
138
172
@@ -217,6 +251,22 b' should succeed, slashy names'
217 </tr>
251 </tr>
218
252
219 <tr class="parity0">
253 <tr class="parity0">
254 <td><a href="/coll/notrepo/e/?style=paper">coll/notrepo/e</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">*</td> (glob)
258 <td class="indexlinks"></td>
259 </tr>
260
261 <tr class="parity1">
262 <td><a href="/coll/notrepo/f/?style=paper">coll/notrepo/f</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">*</td> (glob)
266 <td class="indexlinks"></td>
267 </tr>
268
269 <tr class="parity0">
220 <td><a href="/rcoll/a/?style=paper">rcoll/a</a></td>
270 <td><a href="/rcoll/a/?style=paper">rcoll/a</a></td>
221 <td>unknown</td>
271 <td>unknown</td>
222 <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>
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>
@@ -257,6 +307,38 b' should succeed, slashy names'
257 </tr>
307 </tr>
258
308
259 <tr class="parity1">
309 <tr class="parity1">
310 <td><a href="/rcoll/notrepo/e/?style=paper">rcoll/notrepo/e</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">*</td> (glob)
314 <td class="indexlinks"></td>
315 </tr>
316
317 <tr class="parity0">
318 <td><a href="/rcoll/notrepo/e/e2/?style=paper">rcoll/notrepo/e/e2</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">*</td> (glob)
322 <td class="indexlinks"></td>
323 </tr>
324
325 <tr class="parity1">
326 <td><a href="/rcoll/notrepo/f/?style=paper">rcoll/notrepo/f</a></td>
327 <td>unknown</td>
328 <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>
329 <td class="age">*</td> (glob)
330 <td class="indexlinks"></td>
331 </tr>
332
333 <tr class="parity0">
334 <td><a href="/rcoll/notrepo/f/f2/?style=paper">rcoll/notrepo/f/f2</a></td>
335 <td>unknown</td>
336 <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>
337 <td class="age">*</td> (glob)
338 <td class="indexlinks"></td>
339 </tr>
340
341 <tr class="parity1">
260 <td><a href="/star/webdir/a/?style=paper">star/webdir/a</a></td>
342 <td><a href="/star/webdir/a/?style=paper">star/webdir/a</a></td>
261 <td>unknown</td>
343 <td>unknown</td>
262 <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>
344 <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,6 +371,22 b' should succeed, slashy names'
289 </tr>
371 </tr>
290
372
291 <tr class="parity1">
373 <tr class="parity1">
374 <td><a href="/star/webdir/notrepo/e/?style=paper">star/webdir/notrepo/e</a></td>
375 <td>unknown</td>
376 <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>
377 <td class="age">*</td> (glob)
378 <td class="indexlinks"></td>
379 </tr>
380
381 <tr class="parity0">
382 <td><a href="/star/webdir/notrepo/f/?style=paper">star/webdir/notrepo/f</a></td>
383 <td>unknown</td>
384 <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>
385 <td class="age">*</td> (glob)
386 <td class="indexlinks"></td>
387 </tr>
388
389 <tr class="parity1">
292 <td><a href="/starstar/webdir/a/?style=paper">starstar/webdir/a</a></td>
390 <td><a href="/starstar/webdir/a/?style=paper">starstar/webdir/a</a></td>
293 <td>unknown</td>
391 <td>unknown</td>
294 <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>
392 <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>
@@ -329,6 +427,38 b' should succeed, slashy names'
329 </tr>
427 </tr>
330
428
331 <tr class="parity0">
429 <tr class="parity0">
430 <td><a href="/starstar/webdir/notrepo/e/?style=paper">starstar/webdir/notrepo/e</a></td>
431 <td>unknown</td>
432 <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>
433 <td class="age">*</td> (glob)
434 <td class="indexlinks"></td>
435 </tr>
436
437 <tr class="parity1">
438 <td><a href="/starstar/webdir/notrepo/e/e2/?style=paper">starstar/webdir/notrepo/e/e2</a></td>
439 <td>unknown</td>
440 <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>
441 <td class="age">*</td> (glob)
442 <td class="indexlinks"></td>
443 </tr>
444
445 <tr class="parity0">
446 <td><a href="/starstar/webdir/notrepo/f/?style=paper">starstar/webdir/notrepo/f</a></td>
447 <td>unknown</td>
448 <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>
449 <td class="age">*</td> (glob)
450 <td class="indexlinks"></td>
451 </tr>
452
453 <tr class="parity1">
454 <td><a href="/starstar/webdir/notrepo/f/f2/?style=paper">starstar/webdir/notrepo/f/f2</a></td>
455 <td>unknown</td>
456 <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>
457 <td class="age">*</td> (glob)
458 <td class="indexlinks"></td>
459 </tr>
460
461 <tr class="parity0">
332 <td><a href="/astar/?style=paper">astar</a></td>
462 <td><a href="/astar/?style=paper">astar</a></td>
333 <td>unknown</td>
463 <td>unknown</td>
334 <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>
464 <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>
@@ -489,6 +619,8 b" Test [paths] '*' extension"
489 /coll/a/.hg/patches/
619 /coll/a/.hg/patches/
490 /coll/b/
620 /coll/b/
491 /coll/c/
621 /coll/c/
622 /coll/notrepo/e/
623 /coll/notrepo/f/
492
624
493 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw'
625 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw'
494 200 Script output follows
626 200 Script output follows
@@ -506,12 +638,140 b" Test [paths] '**' extension"
506 /rcoll/b/
638 /rcoll/b/
507 /rcoll/b/d/
639 /rcoll/b/d/
508 /rcoll/c/
640 /rcoll/c/
641 /rcoll/notrepo/e/
642 /rcoll/notrepo/e/e2/
643 /rcoll/notrepo/f/
644 /rcoll/notrepo/f/f2/
645
646 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw'
647 200 Script output follows
648
649 d
650
651 Test collapse = True
652
653 $ "$TESTDIR/killdaemons.py"
654 $ cat >> paths.conf <<EOF
655 > [web]
656 > collapse=true
657 > EOF
658 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
659 > -A access-paths.log -E error-paths-3.log
660 $ cat hg.pid >> $DAEMON_PIDS
661 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/?style=raw'
662 200 Script output follows
663
664
665 /coll/a/
666 /coll/a/.hg/patches/
667 /coll/b/
668 /coll/c/
669 /coll/notrepo/
670
671 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw'
672 200 Script output follows
673
674 a
675 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw'
676 200 Script output follows
677
678
679 /rcoll/a/
680 /rcoll/a/.hg/patches/
681 /rcoll/b/
682 /rcoll/b/d/
683 /rcoll/c/
684 /rcoll/notrepo/
509
685
510 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw'
686 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw'
511 200 Script output follows
687 200 Script output follows
512
688
513 d
689 d
514
690
691 Test intermediate directories
692
693 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/?style=raw'
694 200 Script output follows
695
696
697 /rcoll/notrepo/e/
698 /rcoll/notrepo/e/e2/
699 /rcoll/notrepo/f/
700 /rcoll/notrepo/f/f2/
701
702
703 Test repositories inside intermediate directories
704
705 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/e/file/tip/e?style=raw'
706 200 Script output follows
707
708 e
709
710 Test subrepositories inside intermediate directories
711
712 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/f/f2/file/tip/f2?style=raw'
713 200 Script output follows
714
715 f2
716
717 Test descend = False
718
719 $ "$TESTDIR/killdaemons.py"
720 $ cat >> paths.conf <<EOF
721 > descend=false
722 > EOF
723 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
724 > -A access-paths.log -E error-paths-4.log
725 $ cat hg.pid >> $DAEMON_PIDS
726 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/?style=raw'
727 200 Script output follows
728
729
730 /coll/a/
731 /coll/b/
732 /coll/c/
733
734 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw'
735 200 Script output follows
736
737 a
738 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw'
739 200 Script output follows
740
741
742 /rcoll/a/
743 /rcoll/b/
744 /rcoll/c/
745
746 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw'
747 200 Script output follows
748
749 d
750
751 Test intermediate directories
752
753 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/?style=raw'
754 200 Script output follows
755
756
757 /rcoll/notrepo/e/
758 /rcoll/notrepo/f/
759
760
761 Test repositories inside intermediate directories
762
763 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/e/file/tip/e?style=raw'
764 200 Script output follows
765
766 e
767
768 Test subrepositories inside intermediate directories
769
770 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/f/f2/file/tip/f2?style=raw'
771 200 Script output follows
772
773 f2
774
515 Test [paths] '*' in a repo root
775 Test [paths] '*' in a repo root
516
776
517 $ hg id http://localhost:$HGPORT1/astar
777 $ hg id http://localhost:$HGPORT1/astar
@@ -523,15 +783,60 b" Test [paths] '*' in a repo root"
523 > t/a = $root/a
783 > t/a = $root/a
524 > t/b = $root/b
784 > t/b = $root/b
525 > c = $root/c
785 > c = $root/c
786 > EOF
787 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
788 > -A access-paths.log -E error-paths-5.log
789 $ cat hg.pid >> $DAEMON_PIDS
790 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
791 200 Script output follows
792
793
794 /t/a/
795 /t/b/
796 /c/
797
798 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
799 200 Script output follows
800
801
802 /t/a/
803 /t/b/
804
805
806 Test collapse = True
807
808 $ "$TESTDIR/killdaemons.py"
809 $ cat >> paths.conf <<EOF
526 > [web]
810 > [web]
811 > collapse=true
812 > EOF
813 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
814 > -A access-paths.log -E error-paths-6.log
815 $ cat hg.pid >> $DAEMON_PIDS
816 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
817 200 Script output follows
818
819
820 /t/
821 /c/
822
823 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
824 200 Script output follows
825
826
827 /t/a/
828 /t/b/
829
830
831 test descend = False
832
833 $ "$TESTDIR/killdaemons.py"
834 $ cat >> paths.conf <<EOF
527 > descend=false
835 > descend=false
528 > EOF
836 > EOF
529 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
837 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
530 > -A access-paths.log -E error-paths-3.log
838 > -A access-paths.log -E error-paths-7.log
531 $ cat hg.pid >> $DAEMON_PIDS
839 $ cat hg.pid >> $DAEMON_PIDS
532
533 test descend = False
534
535 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
840 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
536 200 Script output follows
841 200 Script output follows
537
842
@@ -552,7 +857,7 b' test descend = False'
552 > inexistent = $root/inexistent
857 > inexistent = $root/inexistent
553 > EOF
858 > EOF
554 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
859 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
555 > -A access-paths.log -E error-paths-4.log
860 > -A access-paths.log -E error-paths-8.log
556 $ cat hg.pid >> $DAEMON_PIDS
861 $ cat hg.pid >> $DAEMON_PIDS
557
862
558 test inexistent and inaccessible repo should be ignored silently
863 test inexistent and inaccessible repo should be ignored silently
@@ -617,6 +922,8 b' collections: should succeed'
617 /a/.hg/patches/
922 /a/.hg/patches/
618 /b/
923 /b/
619 /c/
924 /c/
925 /notrepo/e/
926 /notrepo/f/
620
927
621 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw'
928 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw'
622 200 Script output follows
929 200 Script output follows
@@ -672,6 +979,26 b' paths errors 3'
672
979
673 $ cat error-paths-3.log
980 $ cat error-paths-3.log
674
981
982 paths errors 4
983
984 $ cat error-paths-4.log
985
986 paths errors 5
987
988 $ cat error-paths-5.log
989
990 paths errors 6
991
992 $ cat error-paths-6.log
993
994 paths errors 7
995
996 $ cat error-paths-7.log
997
998 paths errors 8
999
1000 $ cat error-paths-8.log
1001
675 collections errors
1002 collections errors
676
1003
677 $ cat error-collections.log
1004 $ cat error-collections.log
General Comments 0
You need to be logged in to leave comments. Login now