Debian Codegraph @

tests/test-hgweb-descend-empties.t

raw
1 #require serve
2
3 Test chains of near empty directories, terminating 3 different ways:
4 - a1: file at level 4 (deepest)
5 - b1: two dirs at level 3
6 - d1: file at level 2
7
8 Set up the repo
9
10 $ hg init test
11 $ cd test
12 $ mkdir -p a1/a2/a3/a4
13 $ mkdir -p b1/b2/b3/b4
14 $ mkdir -p b1/b2/b3/c4
15 $ mkdir -p d1/d2/d3/d4
16 $ echo foo > a1/a2/a3/a4/foo
17 $ echo foo > b1/b2/b3/b4/foo
18 $ echo foo > b1/b2/b3/c4/foo
19 $ echo foo > d1/d2/d3/d4/foo
20 $ echo foo > d1/d2/foo
21 $ hg ci -Ama
22 adding a1/a2/a3/a4/foo
23 adding b1/b2/b3/b4/foo
24 adding b1/b2/b3/c4/foo
25 adding d1/d2/d3/d4/foo
26 adding d1/d2/foo
27 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
28 $ cat hg.pid >> $DAEMON_PIDS
29
30 manifest with descending (paper)
31
32 $ get-with-headers.py $LOCALIP:$HGPORT 'file'
33 200 Script output follows
34
35 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
36 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
37 <head>
38 <link rel="icon" href="/static/hgicon.png" type="image/png" />
39 <meta name="robots" content="index, nofollow" />
40 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
41 <script type="text/javascript" src="/static/mercurial.js"></script>
42
43 <title>test: c9f45f7a1659 /</title>
44 </head>
45 <body>
46
47 <div class="container">
48 <div class="menu">
49 <div class="logo">
50 <a href="https://mercurial-scm.org/">
51 <img src="/static/hglogo.png" alt="mercurial" /></a>
52 </div>
53 <ul>
54 <li><a href="/shortlog/tip">log</a></li>
55 <li><a href="/graph/tip">graph</a></li>
56 <li><a href="/tags">tags</a></li>
57 <li><a href="/bookmarks">bookmarks</a></li>
58 <li><a href="/branches">branches</a></li>
59 </ul>
60 <ul>
61 <li><a href="/rev/tip">changeset</a></li>
62 <li class="active">browse</li>
63 </ul>
64 <ul>
65
66 </ul>
67 <ul>
68 <li><a href="/help">help</a></li>
69 </ul>
70 </div>
71
72 <div class="main">
73 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
74 <h3>
75 directory / @ 0:<a href="/rev/c9f45f7a1659">c9f45f7a1659</a>
76 <span class="phase">draft</span> <span class="branchhead">default</span> <span class="tag">tip</span>
77 </h3>
78
79
80 <form class="search" action="/log">
81
82 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
83 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
84 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
85 </form>
86
87 <table class="bigtable">
88 <thead>
89 <tr>
90 <th class="name">name</th>
91 <th class="size">size</th>
92 <th class="permissions">permissions</th>
93 </tr>
94 </thead>
95 <tbody class="stripes2">
96
97
98 <tr class="fileline">
99 <td class="name">
100 <a href="/file/tip/a1">
101 <img src="/static/coal-folder.png" alt="dir."/> a1/
102 </a>
103 <a href="/file/tip/a1/a2/a3/a4">
104 a2/a3/a4
105 </a>
106 </td>
107 <td class="size"></td>
108 <td class="permissions">drwxr-xr-x</td>
109 </tr>
110 <tr class="fileline">
111 <td class="name">
112 <a href="/file/tip/b1">
113 <img src="/static/coal-folder.png" alt="dir."/> b1/
114 </a>
115 <a href="/file/tip/b1/b2/b3">
116 b2/b3
117 </a>
118 </td>
119 <td class="size"></td>
120 <td class="permissions">drwxr-xr-x</td>
121 </tr>
122 <tr class="fileline">
123 <td class="name">
124 <a href="/file/tip/d1">
125 <img src="/static/coal-folder.png" alt="dir."/> d1/
126 </a>
127 <a href="/file/tip/d1/d2">
128 d2
129 </a>
130 </td>
131 <td class="size"></td>
132 <td class="permissions">drwxr-xr-x</td>
133 </tr>
134
135 </tbody>
136 </table>
137 </div>
138 </div>
139
140
141 </body>
142 </html>
143
144
145 manifest with descending (coal)
146
147 $ get-with-headers.py $LOCALIP:$HGPORT 'file?style=coal'
148 200 Script output follows
149
150 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
151 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
152 <head>
153 <link rel="icon" href="/static/hgicon.png" type="image/png" />
154 <meta name="robots" content="index, nofollow" />
155 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
156 <link rel="stylesheet" href="/static/style-extra-coal.css" type="text/css" />
157 <script type="text/javascript" src="/static/mercurial.js"></script>
158
159 <title>test: c9f45f7a1659 /</title>
160 </head>
161 <body>
162
163 <div class="container">
164 <div class="menu">
165 <div class="logo">
166 <a href="https://mercurial-scm.org/">
167 <img src="/static/hglogo.png" alt="mercurial" /></a>
168 </div>
169 <ul>
170 <li><a href="/shortlog/tip?style=coal">log</a></li>
171 <li><a href="/graph/tip?style=coal">graph</a></li>
172 <li><a href="/tags?style=coal">tags</a></li>
173 <li><a href="/bookmarks?style=coal">bookmarks</a></li>
174 <li><a href="/branches?style=coal">branches</a></li>
175 </ul>
176 <ul>
177 <li><a href="/rev/tip?style=coal">changeset</a></li>
178 <li class="active">browse</li>
179 </ul>
180 <ul>
181
182 </ul>
183 <ul>
184 <li><a href="/help?style=coal">help</a></li>
185 </ul>
186 </div>
187
188 <div class="main">
189 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
190 <h3>
191 directory / @ 0:<a href="/rev/c9f45f7a1659?style=coal">c9f45f7a1659</a>
192 <span class="phase">draft</span> <span class="branchhead">default</span> <span class="tag">tip</span>
193 </h3>
194
195
196 <form class="search" action="/log">
197 <input type="hidden" name="style" value="coal" />
198 <p><input name="rev" id="search1" type="text" size="30" value="" /></p>
199 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
200 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
201 </form>
202
203 <table class="bigtable">
204 <thead>
205 <tr>
206 <th class="name">name</th>
207 <th class="size">size</th>
208 <th class="permissions">permissions</th>
209 </tr>
210 </thead>
211 <tbody class="stripes2">
212
213
214 <tr class="fileline">
215 <td class="name">
216 <a href="/file/tip/a1?style=coal">
217 <img src="/static/coal-folder.png" alt="dir."/> a1/
218 </a>
219 <a href="/file/tip/a1/a2/a3/a4?style=coal">
220 a2/a3/a4
221 </a>
222 </td>
223 <td class="size"></td>
224 <td class="permissions">drwxr-xr-x</td>
225 </tr>
226 <tr class="fileline">
227 <td class="name">
228 <a href="/file/tip/b1?style=coal">
229 <img src="/static/coal-folder.png" alt="dir."/> b1/
230 </a>
231 <a href="/file/tip/b1/b2/b3?style=coal">
232 b2/b3
233 </a>
234 </td>
235 <td class="size"></td>
236 <td class="permissions">drwxr-xr-x</td>
237 </tr>
238 <tr class="fileline">
239 <td class="name">
240 <a href="/file/tip/d1?style=coal">
241 <img src="/static/coal-folder.png" alt="dir."/> d1/
242 </a>
243 <a href="/file/tip/d1/d2?style=coal">
244 d2
245 </a>
246 </td>
247 <td class="size"></td>
248 <td class="permissions">drwxr-xr-x</td>
249 </tr>
250
251 </tbody>
252 </table>
253 </div>
254 </div>
255
256
257 </body>
258 </html>
259
260
261 manifest with descending (monoblue)
262
263 $ get-with-headers.py $LOCALIP:$HGPORT 'file?style=monoblue'
264 200 Script output follows
265
266 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
267 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
268 <head>
269 <link rel="icon" href="/static/hgicon.png" type="image/png" />
270 <meta name="robots" content="index, nofollow"/>
271 <link rel="stylesheet" href="/static/style-monoblue.css" type="text/css" />
272 <script type="text/javascript" src="/static/mercurial.js"></script>
273
274 <title>test: files</title>
275 <link rel="alternate" type="application/atom+xml" href="/atom-log" title="Atom feed for test"/>
276 <link rel="alternate" type="application/rss+xml" href="/rss-log" title="RSS feed for test"/>
277 </head>
278
279 <body>
280 <div id="container">
281 <div class="page-header">
282 <h1 class="breadcrumb"><a href="/">Mercurial</a> / files</h1>
283
284
285 <form action="/log">
286 <input type="hidden" name="style" value="monoblue" />
287 <dl class="search">
288 <dt><label>Search: </label></dt>
289 <dd><input type="text" name="rev" value="" /></dd>
290 </dl>
291 </form>
292
293 <ul class="page-nav">
294 <li><a href="/summary?style=monoblue">summary</a></li>
295 <li><a href="/shortlog?style=monoblue">shortlog</a></li>
296 <li><a href="/changelog?style=monoblue">changelog</a></li>
297 <li><a href="/graph/tip?style=monoblue">graph</a></li>
298 <li><a href="/tags?style=monoblue">tags</a></li>
299 <li><a href="/bookmarks?style=monoblue">bookmarks</a></li>
300 <li><a href="/branches?style=monoblue">branches</a></li>
301 <li class="current">files</li>
302 <li><a href="/help?style=monoblue">help</a></li>
303 </ul>
304 </div>
305
306 <ul class="submenu">
307 <li><a href="/rev/tip?style=monoblue">changeset</a></li>
308
309 </ul>
310
311 <h2 class="no-link no-border">files</h2>
312 <p class="files">/ <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="branchtag" title="default">default</span> <span class="tagtag" title="tip">tip</span> </span></p>
313
314 <table>
315
316
317 <tr class="parity1">
318 <td>drwxr-xr-x</td>
319 <td></td>
320 <td></td>
321 <td>
322 <a href="/file/tip/a1?style=monoblue">a1</a>
323 <a href="/file/tip/a1/a2/a3/a4?style=monoblue">a2/a3/a4</a>
324 </td>
325 <td><a href="/file/tip/a1?style=monoblue">files</a></td>
326 </tr>
327 <tr class="parity0">
328 <td>drwxr-xr-x</td>
329 <td></td>
330 <td></td>
331 <td>
332 <a href="/file/tip/b1?style=monoblue">b1</a>
333 <a href="/file/tip/b1/b2/b3?style=monoblue">b2/b3</a>
334 </td>
335 <td><a href="/file/tip/b1?style=monoblue">files</a></td>
336 </tr>
337 <tr class="parity1">
338 <td>drwxr-xr-x</td>
339 <td></td>
340 <td></td>
341 <td>
342 <a href="/file/tip/d1?style=monoblue">d1</a>
343 <a href="/file/tip/d1/d2?style=monoblue">d2</a>
344 </td>
345 <td><a href="/file/tip/d1?style=monoblue">files</a></td>
346 </tr>
347
348 </table>
349
350 <div class="page-footer">
351 <p>Mercurial Repository: test</p>
352 <ul class="rss-logo">
353 <li><a href="/rss-log">RSS</a></li>
354 <li><a href="/atom-log">Atom</a></li>
355 </ul>
356
357 </div>
358
359 <div id="powered-by">
360 <p><a href="https://mercurial-scm.org/" title="Mercurial"><img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a></p>
361 </div>
362
363 </div>
364
365 </body>
366 </html>
367
368
369 manifest with descending (gitweb)
370
371 $ get-with-headers.py $LOCALIP:$HGPORT 'file?style=gitweb'
372 200 Script output follows
373
374 <?xml version="1.0" encoding="ascii"?>
375 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
376 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
377 <head>
378 <link rel="icon" href="/static/hgicon.png" type="image/png" />
379 <meta name="robots" content="index, nofollow"/>
380 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
381 <script type="text/javascript" src="/static/mercurial.js"></script>
382
383 <title>test: files</title>
384 <link rel="alternate" type="application/atom+xml"
385 href="/atom-log" title="Atom feed for test"/>
386 <link rel="alternate" type="application/rss+xml"
387 href="/rss-log" title="RSS feed for test"/>
388 </head>
389 <body>
390
391 <div class="page_header">
392 <a href="https://mercurial-scm.org/" title="Mercurial" style="float: right;">Mercurial</a>
393 <a href="/">Mercurial</a> / files
394 </div>
395
396 <div class="page_nav">
397 <div>
398 <a href="/summary?style=gitweb">summary</a> |
399 <a href="/shortlog?style=gitweb">shortlog</a> |
400 <a href="/log?style=gitweb">changelog</a> |
401 <a href="/graph?style=gitweb">graph</a> |
402 <a href="/tags?style=gitweb">tags</a> |
403 <a href="/bookmarks?style=gitweb">bookmarks</a> |
404 <a href="/branches?style=gitweb">branches</a> |
405 files |
406 <a href="/rev/tip?style=gitweb">changeset</a> |
407 <a href="/help?style=gitweb">help</a>
408 </div>
409
410 <div class="search">
411 <form id="searchform" action="/log">
412 <input type="hidden" name="style" value="gitweb" />
413 <input name="rev" type="text" value="" size="40" />
414 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
415 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
416 </form>
417 </div>
418 </div>
419
420 <div class="title">/ <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="branchtag" title="default">default</span> <span class="tagtag" title="tip">tip</span> </span></div>
421 <table cellspacing="0">
422
423
424 <tr class="parity1">
425 <td style="font-family:monospace">drwxr-xr-x</td>
426 <td style="font-family:monospace"></td>
427 <td style="font-family:monospace"></td>
428 <td>
429 <a href="/file/tip/a1?style=gitweb">a1</a>
430 <a href="/file/tip/a1/a2/a3/a4?style=gitweb">a2/a3/a4</a>
431 </td>
432 <td class="link">
433 <a href="/file/tip/a1?style=gitweb">files</a>
434 </td>
435 </tr>
436 <tr class="parity0">
437 <td style="font-family:monospace">drwxr-xr-x</td>
438 <td style="font-family:monospace"></td>
439 <td style="font-family:monospace"></td>
440 <td>
441 <a href="/file/tip/b1?style=gitweb">b1</a>
442 <a href="/file/tip/b1/b2/b3?style=gitweb">b2/b3</a>
443 </td>
444 <td class="link">
445 <a href="/file/tip/b1?style=gitweb">files</a>
446 </td>
447 </tr>
448 <tr class="parity1">
449 <td style="font-family:monospace">drwxr-xr-x</td>
450 <td style="font-family:monospace"></td>
451 <td style="font-family:monospace"></td>
452 <td>
453 <a href="/file/tip/d1?style=gitweb">d1</a>
454 <a href="/file/tip/d1/d2?style=gitweb">d2</a>
455 </td>
456 <td class="link">
457 <a href="/file/tip/d1?style=gitweb">files</a>
458 </td>
459 </tr>
460
461 </table>
462
463 <div class="page_footer">
464 <div class="page_footer_text">test</div>
465 <div class="rss_logo">
466 <a href="/rss-log">RSS</a>
467 <a href="/atom-log">Atom</a>
468 </div>
469 <br />
470
471 </div>
472 </body>
473 </html>
474
475
476 manifest with descending (spartan)
477
478 $ get-with-headers.py $LOCALIP:$HGPORT 'file?style=spartan'
479 200 Script output follows
480
481 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
482 <html>
483 <head>
484 <link rel="icon" href="/static/hgicon.png" type="image/png">
485 <meta name="robots" content="index, nofollow" />
486 <link rel="stylesheet" href="/static/style.css" type="text/css" />
487 <script type="text/javascript" src="/static/mercurial.js"></script>
488
489 <title>test: files for changeset c9f45f7a1659</title>
490 </head>
491 <body>
492
493 <div class="buttons">
494 <a href="/log/tip?style=spartan">changelog</a>
495 <a href="/shortlog/tip?style=spartan">shortlog</a>
496 <a href="/graph/tip?style=spartan">graph</a>
497 <a href="/tags?style=spartan">tags</a>
498 <a href="/branches?style=spartan">branches</a>
499 <a href="/rev/tip?style=spartan">changeset</a>
500
501 <a href="/help?style=spartan">help</a>
502 </div>
503
504 <h2><a href="/">Mercurial</a> / files for changeset <a href="/rev/c9f45f7a1659">c9f45f7a1659</a>: /</h2>
505
506 <table cellpadding="0" cellspacing="0">
507
508
509 <tr class="parity1">
510 <td><tt>drwxr-xr-x</tt>&nbsp;</td>
511 <td>&nbsp;</td>
512 <td>&nbsp;</td>
513 <td>
514 <a href="/file/tip/a1?style=spartan">a1/</a>
515 <a href="/file/tip/a1/a2/a3/a4?style=spartan">
516 a2/a3/a4
517 </a>
518 </td>
519 </tr>
520 <tr class="parity0">
521 <td><tt>drwxr-xr-x</tt>&nbsp;</td>
522 <td>&nbsp;</td>
523 <td>&nbsp;</td>
524 <td>
525 <a href="/file/tip/b1?style=spartan">b1/</a>
526 <a href="/file/tip/b1/b2/b3?style=spartan">
527 b2/b3
528 </a>
529 </td>
530 </tr>
531 <tr class="parity1">
532 <td><tt>drwxr-xr-x</tt>&nbsp;</td>
533 <td>&nbsp;</td>
534 <td>&nbsp;</td>
535 <td>
536 <a href="/file/tip/d1?style=spartan">d1/</a>
537 <a href="/file/tip/d1/d2?style=spartan">
538 d2
539 </a>
540 </td>
541 </tr>
542
543 </table>
544
545 <div class="logo">
546 <a href="https://mercurial-scm.org/">
547 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
548 </div>
549
550 </body>
551 </html>
552
553
554 $ cat errors.log
555
556 $ cd ..