##// END OF EJS Templates
tests: unify test-hgweb-descend-empties
Matt Mackall -
r12434:3cf40f64 default
parent child Browse files
Show More
@@ -1,28 +1,134 b''
1 #!/bin/sh
1 Test chains of near empty directories, terminating 3 different ways:
2 # Test chains of near empty directories, terminating 3 different ways:
2 - a1: file at level 4 (deepest)
3 # - a1: file at level 4 (deepest)
3 - b1: two dirs at level 3
4 # - b1: two dirs at level 3
4 - e1: file at level 2
5 # - e1: file at level 2
5
6 Set up the repo
7
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 adding a1/a2/a3/a4/foo
21 adding b1/b2/b3/b4/foo
22 adding b1/b2/c3/c4/foo
23 adding d1/d2/d3/d4/foo
24 adding d1/d2/foo
25 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
26 $ cat hg.pid >> $DAEMON_PIDS
27
28 manifest with descending
6
29
7 echo % Set up the repo
30 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file'
8 hg init test
31 200 Script output follows
9 cd test
32
10 mkdir -p a1/a2/a3/a4
33 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
11 mkdir -p b1/b2/b3/b4
34 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
12 mkdir -p b1/b2/c3/c4
35 <head>
13 mkdir -p d1/d2/d3/d4
36 <link rel="icon" href="/static/hgicon.png" type="image/png" />
14 echo foo > a1/a2/a3/a4/foo
37 <meta name="robots" content="index, nofollow" />
15 echo foo > b1/b2/b3/b4/foo
38 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
16 echo foo > b1/b2/c3/c4/foo
39
17 echo foo > d1/d2/d3/d4/foo
40 <title>test: 9087c84a0f5d /</title>
18 echo foo > d1/d2/foo
41 </head>
19 hg ci -Ama
42 <body>
43
44 <div class="container">
45 <div class="menu">
46 <div class="logo">
47 <a href="http://mercurial.selenic.com/">
48 <img src="/static/hglogo.png" alt="mercurial" /></a>
49 </div>
50 <ul>
51 <li><a href="/shortlog/9087c84a0f5d">log</a></li>
52 <li><a href="/graph/9087c84a0f5d">graph</a></li>
53 <li><a href="/tags">tags</a></li>
54 <li><a href="/branches">branches</a></li>
55 </ul>
56 <ul>
57 <li><a href="/rev/9087c84a0f5d">changeset</a></li>
58 <li class="active">browse</li>
59 </ul>
60 <ul>
61
62 </ul>
63 </div>
64
65 <div class="main">
66 <h2><a href="/">test</a></h2>
67 <h3>directory / @ 0:9087c84a0f5d <span class="tag">tip</span> </h3>
68
69 <form class="search" action="/log">
70
71 <p><input name="rev" id="search1" type="text" size="30" /></p>
72 <div id="hint">find changesets by author, revision,
73 files, or words in the commit message</div>
74 </form>
75
76 <table class="bigtable">
77 <tr>
78 <th class="name">name</th>
79 <th class="size">size</th>
80 <th class="permissions">permissions</th>
81 </tr>
82 <tr class="fileline parity0">
83 <td class="name"><a href="/file/9087c84a0f5d/">[up]</a></td>
84 <td class="size"></td>
85 <td class="permissions">drwxr-xr-x</td>
86 </tr>
87
88 <tr class="fileline parity1">
89 <td class="name">
90 <a href="/file/9087c84a0f5d/a1">
91 <img src="/static/coal-folder.png" alt="dir."/> a1/
92 </a>
93 <a href="/file/9087c84a0f5d/a1/a2/a3/a4">
94 a2/a3/a4
95 </a>
96 </td>
97 <td class="size"></td>
98 <td class="permissions">drwxr-xr-x</td>
99 </tr>
100 <tr class="fileline parity0">
101 <td class="name">
102 <a href="/file/9087c84a0f5d/b1">
103 <img src="/static/coal-folder.png" alt="dir."/> b1/
104 </a>
105 <a href="/file/9087c84a0f5d/b1/b2">
106 b2
107 </a>
108 </td>
109 <td class="size"></td>
110 <td class="permissions">drwxr-xr-x</td>
111 </tr>
112 <tr class="fileline parity1">
113 <td class="name">
114 <a href="/file/9087c84a0f5d/d1">
115 <img src="/static/coal-folder.png" alt="dir."/> d1/
116 </a>
117 <a href="/file/9087c84a0f5d/d1/d2">
118 d2
119 </a>
120 </td>
121 <td class="size"></td>
122 <td class="permissions">drwxr-xr-x</td>
123 </tr>
124
125 </table>
126 </div>
127 </div>
128
129
130 </body>
131 </html>
132
20
133
21 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
134 $ cat 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
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now