comparison tests/test-hgweb-descend-empties @ 7305:c21d236ca897

hgweb: descend empty directories in web view When a manifest has a series of directories with nothing in them but a single directory, displaying the entire chain of empty directories allows for navigation down to the first non-empty directory with a single click. Because Java links package hierarchy to directory hierarchy, and because Java conventions include at least three empty directories at the top of this hierarchy, descending down empty directories is very common in Java web tools.
author Ry4an Brase <ry4an-hg@ry4an.org>
date Mon, 03 Nov 2008 10:20:28 +0100
parents
children
comparison
equal deleted inserted replaced
7304:68374f1c8c87 7305:c21d236ca897
1 #!/bin/sh
2 # Test chains of near empty directories, terminating 3 different ways:
3 # - a1: file at level 4 (deepest)
4 # - b1: two dirs at level 3
5 # - e1: file at level 2
6
7 echo % Set up the repo
8 hg init test
9 cd test
10 mkdir -p a1/a2/a3/a4
11 mkdir -p b1/b2/b3/b4
12 mkdir -p b1/b2/c3/c4
13 mkdir -p d1/d2/d3/d4
14 echo foo > a1/a2/a3/a4/foo
15 echo foo > b1/b2/b3/b4/foo
16 echo foo > b1/b2/c3/c4/foo
17 echo foo > d1/d2/d3/d4/foo
18 echo foo > d1/d2/foo
19 hg ci -Ama
20
21 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
22 cat hg.pid >> $DAEMON_PIDS
23
24 echo % manifest with descending
25 "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file'
26
27 echo % ERRORS ENCOUNTERED
28 cat errors.log