comparison tests/test-hgweb-commands.t @ 12433:abbe2e979948

tests: unify test-hgweb-commands
author Matt Mackall <mpm@selenic.com>
date Sun, 26 Sep 2010 13:41:32 -0500
parents tests/test-hgweb-commands@a65ea28269ef
children d08bb64888bc
comparison
equal deleted inserted replaced
12432:7f3af5da4e6c 12433:abbe2e979948
1 An attempt at more fully testing the hgweb web interface.
2 The following things are tested elsewhere and are therefore omitted:
3 - archive, tested in test-archive
4 - unbundle, tested in test-push-http
5 - changegroupsubset, tested in test-pull
6
7 Set up the repo
8
9 $ hg init test
10 $ cd test
11 $ mkdir da
12 $ echo foo > da/foo
13 $ echo foo > foo
14 $ hg ci -Ambase
15 adding da/foo
16 adding foo
17 $ hg tag 1.0
18 $ echo another > foo
19 $ hg branch stable
20 marked working directory as branch stable
21 $ hg ci -Ambranch
22 $ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
23 $ cat hg.pid >> $DAEMON_PIDS
24
25 Logs and changes
26
27 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom'
28 200 Script output follows
29
30 <?xml version="1.0" encoding="ascii"?>
31 <feed xmlns="http://www.w3.org/2005/Atom">
32 <!-- Changelog -->
33 <id>http://*/</id> (glob)
34 <link rel="self" href="http://*/atom-log"/> (glob)
35 <link rel="alternate" href="http://*/"/> (glob)
36 <title>test Changelog</title>
37 <updated>1970-01-01T00:00:00+00:00</updated>
38
39 <entry>
40 <title>branch</title>
41 <id>http://*/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe</id> (glob)
42 <link href="http://*/rev/1d22e65f027e"/> (glob)
43 <author>
44 <name>test</name>
45 <email>&#116;&#101;&#115;&#116;</email>
46 </author>
47 <updated>1970-01-01T00:00:00+00:00</updated>
48 <published>1970-01-01T00:00:00+00:00</published>
49 <content type="xhtml">
50 <div xmlns="http://www.w3.org/1999/xhtml">
51 <pre xml:space="preserve">branch</pre>
52 </div>
53 </content>
54 </entry>
55 <entry>
56 <title>Added tag 1.0 for changeset 2ef0ac749a14</title>
57 <id>http://*/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de</id> (glob)
58 <link href="http://*/rev/a4f92ed23982"/> (glob)
59 <author>
60 <name>test</name>
61 <email>&#116;&#101;&#115;&#116;</email>
62 </author>
63 <updated>1970-01-01T00:00:00+00:00</updated>
64 <published>1970-01-01T00:00:00+00:00</published>
65 <content type="xhtml">
66 <div xmlns="http://www.w3.org/1999/xhtml">
67 <pre xml:space="preserve">Added tag 1.0 for changeset 2ef0ac749a14</pre>
68 </div>
69 </content>
70 </entry>
71 <entry>
72 <title>base</title>
73 <id>http://*/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
74 <link href="http://*/rev/2ef0ac749a14"/> (glob)
75 <author>
76 <name>test</name>
77 <email>&#116;&#101;&#115;&#116;</email>
78 </author>
79 <updated>1970-01-01T00:00:00+00:00</updated>
80 <published>1970-01-01T00:00:00+00:00</published>
81 <content type="xhtml">
82 <div xmlns="http://www.w3.org/1999/xhtml">
83 <pre xml:space="preserve">base</pre>
84 </div>
85 </content>
86 </entry>
87
88 </feed>
89 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom'
90 200 Script output follows
91
92 <?xml version="1.0" encoding="ascii"?>
93 <feed xmlns="http://www.w3.org/2005/Atom">
94 <!-- Changelog -->
95 <id>http://*/</id> (glob)
96 <link rel="self" href="http://*/atom-log"/> (glob)
97 <link rel="alternate" href="http://*/"/> (glob)
98 <title>test Changelog</title>
99 <updated>1970-01-01T00:00:00+00:00</updated>
100
101 <entry>
102 <title>branch</title>
103 <id>http://*/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe</id> (glob)
104 <link href="http://*/rev/1d22e65f027e"/> (glob)
105 <author>
106 <name>test</name>
107 <email>&#116;&#101;&#115;&#116;</email>
108 </author>
109 <updated>1970-01-01T00:00:00+00:00</updated>
110 <published>1970-01-01T00:00:00+00:00</published>
111 <content type="xhtml">
112 <div xmlns="http://www.w3.org/1999/xhtml">
113 <pre xml:space="preserve">branch</pre>
114 </div>
115 </content>
116 </entry>
117 <entry>
118 <title>Added tag 1.0 for changeset 2ef0ac749a14</title>
119 <id>http://*/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de</id> (glob)
120 <link href="http://*/rev/a4f92ed23982"/> (glob)
121 <author>
122 <name>test</name>
123 <email>&#116;&#101;&#115;&#116;</email>
124 </author>
125 <updated>1970-01-01T00:00:00+00:00</updated>
126 <published>1970-01-01T00:00:00+00:00</published>
127 <content type="xhtml">
128 <div xmlns="http://www.w3.org/1999/xhtml">
129 <pre xml:space="preserve">Added tag 1.0 for changeset 2ef0ac749a14</pre>
130 </div>
131 </content>
132 </entry>
133 <entry>
134 <title>base</title>
135 <id>http://*/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
136 <link href="http://*/rev/2ef0ac749a14"/> (glob)
137 <author>
138 <name>test</name>
139 <email>&#116;&#101;&#115;&#116;</email>
140 </author>
141 <updated>1970-01-01T00:00:00+00:00</updated>
142 <published>1970-01-01T00:00:00+00:00</published>
143 <content type="xhtml">
144 <div xmlns="http://www.w3.org/1999/xhtml">
145 <pre xml:space="preserve">base</pre>
146 </div>
147 </content>
148 </entry>
149
150 </feed>
151 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom'
152 200 Script output follows
153
154 <?xml version="1.0" encoding="ascii"?>
155 <feed xmlns="http://www.w3.org/2005/Atom">
156 <id>http://*/atom-log/tip/foo</id> (glob)
157 <link rel="self" href="http://*/atom-log/tip/foo"/> (glob)
158 <title>test: foo history</title>
159 <updated>1970-01-01T00:00:00+00:00</updated>
160
161 <entry>
162 <title>base</title>
163 <id>http://*/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
164 <link href="http://*/rev/2ef0ac749a14"/> (glob)
165 <author>
166 <name>test</name>
167 <email>&#116;&#101;&#115;&#116;</email>
168 </author>
169 <updated>1970-01-01T00:00:00+00:00</updated>
170 <published>1970-01-01T00:00:00+00:00</published>
171 <content type="xhtml">
172 <div xmlns="http://www.w3.org/1999/xhtml">
173 <pre xml:space="preserve">base</pre>
174 </div>
175 </content>
176 </entry>
177
178 </feed>
179 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/'
180 200 Script output follows
181
182 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
183 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
184 <head>
185 <link rel="icon" href="/static/hgicon.png" type="image/png" />
186 <meta name="robots" content="index, nofollow" />
187 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
188
189 <title>test: log</title>
190 <link rel="alternate" type="application/atom+xml"
191 href="/atom-log" title="Atom feed for test" />
192 <link rel="alternate" type="application/rss+xml"
193 href="/rss-log" title="RSS feed for test" />
194 </head>
195 <body>
196
197 <div class="container">
198 <div class="menu">
199 <div class="logo">
200 <a href="http://mercurial.selenic.com/">
201 <img src="/static/hglogo.png" alt="mercurial" /></a>
202 </div>
203 <ul>
204 <li class="active">log</li>
205 <li><a href="/graph/1d22e65f027e">graph</a></li>
206 <li><a href="/tags">tags</a></li>
207 <li><a href="/branches">branches</a></li>
208 </ul>
209 <ul>
210 <li><a href="/rev/1d22e65f027e">changeset</a></li>
211 <li><a href="/file/1d22e65f027e">browse</a></li>
212 </ul>
213 <ul>
214
215 </ul>
216 </div>
217
218 <div class="main">
219 <h2><a href="/">test</a></h2>
220 <h3>log</h3>
221
222 <form class="search" action="/log">
223
224 <p><input name="rev" id="search1" type="text" size="30" /></p>
225 <div id="hint">find changesets by author, revision,
226 files, or words in the commit message</div>
227 </form>
228
229 <div class="navigate">
230 <a href="/shortlog/2?revcount=30">less</a>
231 <a href="/shortlog/2?revcount=120">more</a>
232 | rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a>
233 </div>
234
235 <table class="bigtable">
236 <tr>
237 <th class="age">age</th>
238 <th class="author">author</th>
239 <th class="description">description</th>
240 </tr>
241 <tr class="parity0">
242 <td class="age">1970-01-01</td>
243 <td class="author">test</td>
244 <td class="description"><a href="/rev/1d22e65f027e">branch</a><span class="branchhead">stable</span> <span class="tag">tip</span> </td>
245 </tr>
246 <tr class="parity1">
247 <td class="age">1970-01-01</td>
248 <td class="author">test</td>
249 <td class="description"><a href="/rev/a4f92ed23982">Added tag 1.0 for changeset 2ef0ac749a14</a><span class="branchhead">default</span> </td>
250 </tr>
251 <tr class="parity0">
252 <td class="age">1970-01-01</td>
253 <td class="author">test</td>
254 <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> </td>
255 </tr>
256
257 </table>
258
259 <div class="navigate">
260 <a href="/shortlog/2?revcount=30">less</a>
261 <a href="/shortlog/2?revcount=120">more</a>
262 | rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a>
263 </div>
264
265 </div>
266 </div>
267
268
269
270 </body>
271 </html>
272
273 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/'
274 200 Script output follows
275
276 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
277 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
278 <head>
279 <link rel="icon" href="/static/hgicon.png" type="image/png" />
280 <meta name="robots" content="index, nofollow" />
281 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
282
283 <title>test: 2ef0ac749a14</title>
284 </head>
285 <body>
286 <div class="container">
287 <div class="menu">
288 <div class="logo">
289 <a href="http://mercurial.selenic.com/">
290 <img src="/static/hglogo.png" alt="mercurial" /></a>
291 </div>
292 <ul>
293 <li><a href="/shortlog/2ef0ac749a14">log</a></li>
294 <li><a href="/graph/2ef0ac749a14">graph</a></li>
295 <li><a href="/tags">tags</a></li>
296 <li><a href="/branches">branches</a></li>
297 </ul>
298 <ul>
299 <li class="active">changeset</li>
300 <li><a href="/raw-rev/2ef0ac749a14">raw</a></li>
301 <li><a href="/file/2ef0ac749a14">browse</a></li>
302 </ul>
303 <ul>
304
305 </ul>
306 </div>
307
308 <div class="main">
309
310 <h2><a href="/">test</a></h2>
311 <h3>changeset 0:2ef0ac749a14 <span class="tag">1.0</span> </h3>
312
313 <form class="search" action="/log">
314
315 <p><input name="rev" id="search1" type="text" size="30" /></p>
316 <div id="hint">find changesets by author, revision,
317 files, or words in the commit message</div>
318 </form>
319
320 <div class="description">base</div>
321
322 <table id="changesetEntry">
323 <tr>
324 <th class="author">author</th>
325 <td class="author">&#116;&#101;&#115;&#116;</td>
326 </tr>
327 <tr>
328 <th class="date">date</th>
329 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td></tr>
330 <tr>
331 <th class="author">parents</th>
332 <td class="author"></td>
333 </tr>
334 <tr>
335 <th class="author">children</th>
336 <td class="author"> <a href="/rev/a4f92ed23982">a4f92ed23982</a></td>
337 </tr>
338 <tr>
339 <th class="files">files</th>
340 <td class="files"><a href="/file/2ef0ac749a14/da/foo">da/foo</a> <a href="/file/2ef0ac749a14/foo">foo</a> </td>
341 </tr>
342 </table>
343
344 <div class="overflow">
345 <div class="sourcefirst"> line diff</div>
346
347 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
348 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/da/foo Thu Jan 01 00:00:00 1970 +0000
349 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
350 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+foo
351 </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
352 </span><a href="#l2.2" id="l2.2"> 2.2</a> <span class="plusline">+++ b/foo Thu Jan 01 00:00:00 1970 +0000
353 </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="atline">@@ -0,0 +1,1 @@
354 </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="plusline">+foo
355 </span></pre></div>
356 </div>
357
358 </div>
359 </div>
360
361
362 </body>
363 </html>
364
365 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw'
366 200 Script output follows
367
368
369 # HG changeset patch
370 # User test
371 # Date 0 0
372 # Node ID a4f92ed23982be056b9852de5dfe873eaac7f0de
373 # Parent 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
374 Added tag 1.0 for changeset 2ef0ac749a14
375
376 diff -r 2ef0ac749a14 -r a4f92ed23982 .hgtags
377 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
378 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
379 @@ -0,0 +1,1 @@
380 +2ef0ac749a14e4f57a5a822464a0902c6f7f448f 1.0
381
382 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log?rev=base'
383 200 Script output follows
384
385 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
386 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
387 <head>
388 <link rel="icon" href="/static/hgicon.png" type="image/png" />
389 <meta name="robots" content="index, nofollow" />
390 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
391
392 <title>test: searching for base</title>
393 </head>
394 <body>
395
396 <div class="container">
397 <div class="menu">
398 <div class="logo">
399 <a href="http://mercurial.selenic.com/">
400 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
401 </div>
402 <ul>
403 <li><a href="/shortlog">log</a></li>
404 <li><a href="/graph">graph</a></li>
405 <li><a href="/tags">tags</a></li>
406 <li><a href="/branches">branches</a></li>
407 </ul>
408 </div>
409
410 <div class="main">
411 <h2><a href="/">test</a></h2>
412 <h3>searching for 'base'</h3>
413
414 <form class="search" action="/log">
415
416 <p><input name="rev" id="search1" type="text" size="30"></p>
417 <div id="hint">find changesets by author, revision,
418 files, or words in the commit message</div>
419 </form>
420
421 <div class="navigate">
422 <a href="/search/?rev=base&revcount=5">less</a>
423 <a href="/search/?rev=base&revcount=20">more</a>
424 </div>
425
426 <table class="bigtable">
427 <tr>
428 <th class="age">age</th>
429 <th class="author">author</th>
430 <th class="description">description</th>
431 </tr>
432 <tr class="parity0">
433 <td class="age">1970-01-01</td>
434 <td class="author">test</td>
435 <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> </td>
436 </tr>
437
438 </table>
439
440 <div class="navigate">
441 <a href="/search/?rev=base&revcount=5">less</a>
442 <a href="/search/?rev=base&revcount=20">more</a>
443 </div>
444
445 </div>
446 </div>
447
448
449
450 </body>
451 </html>
452
453
454 File-related
455
456 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw'
457 200 Script output follows
458
459 foo
460 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw'
461 200 Script output follows
462
463
464 test@0: foo
465
466
467
468
469 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw'
470 200 Script output follows
471
472
473 drwxr-xr-x da
474 -rw-r--r-- 45 .hgtags
475 -rw-r--r-- 4 foo
476
477
478 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo'
479 200 Script output follows
480
481 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
482 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
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-paper.css" type="text/css" />
487
488 <title>test: a4f92ed23982 foo</title>
489 </head>
490 <body>
491
492 <div class="container">
493 <div class="menu">
494 <div class="logo">
495 <a href="http://mercurial.selenic.com/">
496 <img src="/static/hglogo.png" alt="mercurial" /></a>
497 </div>
498 <ul>
499 <li><a href="/shortlog/a4f92ed23982">log</a></li>
500 <li><a href="/graph/a4f92ed23982">graph</a></li>
501 <li><a href="/tags">tags</a></li>
502 <li><a href="/branches">branches</a></li>
503 </ul>
504 <ul>
505 <li><a href="/rev/a4f92ed23982">changeset</a></li>
506 <li><a href="/file/a4f92ed23982/">browse</a></li>
507 </ul>
508 <ul>
509 <li class="active">file</li>
510 <li><a href="/file/tip/foo">latest</a></li>
511 <li><a href="/diff/a4f92ed23982/foo">diff</a></li>
512 <li><a href="/annotate/a4f92ed23982/foo">annotate</a></li>
513 <li><a href="/log/a4f92ed23982/foo">file log</a></li>
514 <li><a href="/raw-file/a4f92ed23982/foo">raw</a></li>
515 </ul>
516 </div>
517
518 <div class="main">
519 <h2><a href="/">test</a></h2>
520 <h3>view foo @ 1:a4f92ed23982</h3>
521
522 <form class="search" action="/log">
523
524 <p><input name="rev" id="search1" type="text" size="30" /></p>
525 <div id="hint">find changesets by author, revision,
526 files, or words in the commit message</div>
527 </form>
528
529 <div class="description">Added tag 1.0 for changeset 2ef0ac749a14</div>
530
531 <table id="changesetEntry">
532 <tr>
533 <th class="author">author</th>
534 <td class="author">&#116;&#101;&#115;&#116;</td>
535 </tr>
536 <tr>
537 <th class="date">date</th>
538 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td>
539 </tr>
540 <tr>
541 <th class="author">parents</th>
542 <td class="author"></td>
543 </tr>
544 <tr>
545 <th class="author">children</th>
546 <td class="author"><a href="/file/1d22e65f027e/foo">1d22e65f027e</a> </td>
547 </tr>
548
549 </table>
550
551 <div class="overflow">
552 <div class="sourcefirst"> line source</div>
553
554 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> foo
555 </div>
556 <div class="sourcelast"></div>
557 </div>
558 </div>
559 </div>
560
561
562
563 </body>
564 </html>
565
566 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw'
567 200 Script output follows
568
569
570 diff -r 000000000000 -r a4f92ed23982 foo
571 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
572 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
573 @@ -0,0 +1,1 @@
574 +foo
575
576
577
578
579
580 Overviews
581
582 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-tags'
583 200 Script output follows
584
585 tip 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
586 1.0 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
587 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-branches'
588 200 Script output follows
589
590 stable 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe open
591 default a4f92ed23982be056b9852de5dfe873eaac7f0de inactive
592 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb'
593 200 Script output follows
594
595 <?xml version="1.0" encoding="ascii"?>
596 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
597 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
598 <head>
599 <link rel="icon" href="/static/hgicon.png" type="image/png" />
600 <meta name="robots" content="index, nofollow"/>
601 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
602
603
604 <title>test: Summary</title>
605 <link rel="alternate" type="application/atom+xml"
606 href="/atom-log" title="Atom feed for test"/>
607 <link rel="alternate" type="application/rss+xml"
608 href="/rss-log" title="RSS feed for test"/>
609 </head>
610 <body>
611
612 <div class="page_header">
613 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="/summary?style=gitweb">test</a> / summary
614
615 <form action="/log">
616 <input type="hidden" name="style" value="gitweb" />
617 <div class="search">
618 <input type="text" name="rev" />
619 </div>
620 </form>
621 </div>
622
623 <div class="page_nav">
624 summary |
625 <a href="/shortlog?style=gitweb">shortlog</a> |
626 <a href="/log?style=gitweb">changelog</a> |
627 <a href="/graph?style=gitweb">graph</a> |
628 <a href="/tags?style=gitweb">tags</a> |
629 <a href="/branches?style=gitweb">branches</a> |
630 <a href="/file/1d22e65f027e?style=gitweb">files</a>
631 <br/>
632 </div>
633
634 <div class="title">&nbsp;</div>
635 <table cellspacing="0">
636 <tr><td>description</td><td>unknown</td></tr>
637 <tr><td>owner</td><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></tr>
638 <tr><td>last change</td><td>Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
639 </table>
640
641 <div><a class="title" href="/shortlog?style=gitweb">changes</a></div>
642 <table cellspacing="0">
643
644 <tr class="parity0">
645 <td class="age"><i>1970-01-01</i></td>
646 <td><i>test</i></td>
647 <td>
648 <a class="list" href="/rev/1d22e65f027e?style=gitweb">
649 <b>branch</b>
650 <span class="logtags"><span class="branchtag" title="stable">stable</span> <span class="tagtag" title="tip">tip</span> </span>
651 </a>
652 </td>
653 <td class="link" nowrap>
654 <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> |
655 <a href="/file/1d22e65f027e?style=gitweb">files</a>
656 </td>
657 </tr>
658 <tr class="parity1">
659 <td class="age"><i>1970-01-01</i></td>
660 <td><i>test</i></td>
661 <td>
662 <a class="list" href="/rev/a4f92ed23982?style=gitweb">
663 <b>Added tag 1.0 for changeset 2ef0ac749a14</b>
664 <span class="logtags"><span class="branchtag" title="default">default</span> </span>
665 </a>
666 </td>
667 <td class="link" nowrap>
668 <a href="/rev/a4f92ed23982?style=gitweb">changeset</a> |
669 <a href="/file/a4f92ed23982?style=gitweb">files</a>
670 </td>
671 </tr>
672 <tr class="parity0">
673 <td class="age"><i>1970-01-01</i></td>
674 <td><i>test</i></td>
675 <td>
676 <a class="list" href="/rev/2ef0ac749a14?style=gitweb">
677 <b>base</b>
678 <span class="logtags"><span class="tagtag" title="1.0">1.0</span> </span>
679 </a>
680 </td>
681 <td class="link" nowrap>
682 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
683 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
684 </td>
685 </tr>
686 <tr class="light"><td colspan="4"><a class="list" href="/shortlog?style=gitweb">...</a></td></tr>
687 </table>
688
689 <div><a class="title" href="/tags?style=gitweb">tags</a></div>
690 <table cellspacing="0">
691
692 <tr class="parity0">
693 <td class="age"><i>1970-01-01</i></td>
694 <td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>1.0</b></a></td>
695 <td class="link">
696 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
697 <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> |
698 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
699 </td>
700 </tr>
701 <tr class="light"><td colspan="3"><a class="list" href="/tags?style=gitweb">...</a></td></tr>
702 </table>
703
704 <div><a class="title" href="#">branches</a></div>
705 <table cellspacing="0">
706
707 <tr class="parity0">
708 <td class="age"><i>1970-01-01</i></td>
709 <td><a class="list" href="/shortlog/1d22e65f027e?style=gitweb"><b>1d22e65f027e</b></a></td>
710 <td class="">stable</td>
711 <td class="link">
712 <a href="/changeset/1d22e65f027e?style=gitweb">changeset</a> |
713 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
714 <a href="/file/1d22e65f027e?style=gitweb">files</a>
715 </td>
716 </tr>
717 <tr class="parity1">
718 <td class="age"><i>1970-01-01</i></td>
719 <td><a class="list" href="/shortlog/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td>
720 <td class="">default</td>
721 <td class="link">
722 <a href="/changeset/a4f92ed23982?style=gitweb">changeset</a> |
723 <a href="/log/a4f92ed23982?style=gitweb">changelog</a> |
724 <a href="/file/a4f92ed23982?style=gitweb">files</a>
725 </td>
726 </tr>
727 <tr class="light">
728 <td colspan="4"><a class="list" href="#">...</a></td>
729 </tr>
730 </table>
731 <div class="page_footer">
732 <div class="page_footer_text">test</div>
733 <div class="rss_logo">
734 <a href="/rss-log">RSS</a>
735 <a href="/atom-log">Atom</a>
736 </div>
737 <br />
738
739 </div>
740 </body>
741 </html>
742
743 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb'
744 200 Script output follows
745
746 <?xml version="1.0" encoding="ascii"?>
747 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
748 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
749 <head>
750 <link rel="icon" href="/static/hgicon.png" type="image/png" />
751 <meta name="robots" content="index, nofollow"/>
752 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
753
754
755 <title>test: Graph</title>
756 <link rel="alternate" type="application/atom+xml"
757 href="/atom-log" title="Atom feed for test"/>
758 <link rel="alternate" type="application/rss+xml"
759 href="/rss-log" title="RSS feed for test"/>
760 <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
761 </head>
762 <body>
763
764 <div class="page_header">
765 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="/summary?style=gitweb">test</a> / graph
766 </div>
767
768 <form action="/log">
769 <input type="hidden" name="style" value="gitweb" />
770 <div class="search">
771 <input type="text" name="rev" />
772 </div>
773 </form>
774 <div class="page_nav">
775 <a href="/summary?style=gitweb">summary</a> |
776 <a href="/shortlog?style=gitweb">shortlog</a> |
777 <a href="/log/2?style=gitweb">changelog</a> |
778 graph |
779 <a href="/tags?style=gitweb">tags</a> |
780 <a href="/branches?style=gitweb">branches</a> |
781 <a href="/file/1d22e65f027e?style=gitweb">files</a>
782 <br/>
783 <a href="/graph/2?style=gitweb&revcount=30">less</a>
784 <a href="/graph/2?style=gitweb&revcount=120">more</a>
785 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a> <br/>
786 </div>
787
788 <div class="title">&nbsp;</div>
789
790 <noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
791
792 <div id="wrapper">
793 <ul id="nodebgs"></ul>
794 <canvas id="graph" width="224" height="129"></canvas>
795 <ul id="graphnodes"></ul>
796 </div>
797
798 <script type="text/javascript" src="/static/graph.js"></script>
799 <script>
800 <!-- hide script content
801
802 var data = [["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", true], ["tip"]], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"]]];
803 var graph = new Graph();
804 graph.scale(39);
805
806 graph.edge = function(x0, y0, x1, y1, color) {
807
808 this.setColor(color, 0.0, 0.65);
809 this.ctx.beginPath();
810 this.ctx.moveTo(x0, y0);
811 this.ctx.lineTo(x1, y1);
812 this.ctx.stroke();
813
814 }
815
816 var revlink = '<li style="_STYLE"><span class="desc">';
817 revlink += '<a class="list" href="/rev/_NODEID?style=gitweb" title="_NODEID"><b>_DESC</b></a>';
818 revlink += '</span> _TAGS';
819 revlink += '<span class="info">_DATE, by _USER</span></li>';
820
821 graph.vertex = function(x, y, color, parity, cur) {
822
823 this.ctx.beginPath();
824 color = this.setColor(color, 0.25, 0.75);
825 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
826 this.ctx.fill();
827
828 var bg = '<li class="bg parity' + parity + '"></li>';
829 var left = (this.columns + 1) * this.bg_height;
830 var nstyle = 'padding-left: ' + left + 'px;';
831 var item = revlink.replace(/_STYLE/, nstyle);
832 item = item.replace(/_PARITY/, 'parity' + parity);
833 item = item.replace(/_NODEID/, cur[0]);
834 item = item.replace(/_NODEID/, cur[0]);
835 item = item.replace(/_DESC/, cur[3]);
836 item = item.replace(/_USER/, cur[4]);
837 item = item.replace(/_DATE/, cur[5]);
838
839 var tagspan = '';
840 if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) {
841 tagspan = '<span class="logtags">';
842 if (cur[6][1]) {
843 tagspan += '<span class="branchtag" title="' + cur[6][0] + '">';
844 tagspan += cur[6][0] + '</span> ';
845 } else if (!cur[6][1] && cur[6][0] != 'default') {
846 tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">';
847 tagspan += cur[6][0] + '</span> ';
848 }
849 if (cur[7].length) {
850 for (var t in cur[7]) {
851 var tag = cur[7][t];
852 tagspan += '<span class="tagtag">' + tag + '</span> ';
853 }
854 }
855 tagspan += '</span>';
856 }
857
858 item = item.replace(/_TAGS/, tagspan);
859 return [bg, item];
860
861 }
862
863 graph.render(data);
864
865 // stop hiding script -->
866 </script>
867
868 <div class="page_nav">
869 <a href="/graph/2?style=gitweb&revcount=30">less</a>
870 <a href="/graph/2?style=gitweb&revcount=120">more</a>
871 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a>
872 </div>
873
874 <div class="page_footer">
875 <div class="page_footer_text">test</div>
876 <div class="rss_logo">
877 <a href="/rss-log">RSS</a>
878 <a href="/atom-log">Atom</a>
879 </div>
880 <br />
881
882 </div>
883 </body>
884 </html>
885
886
887 capabilities
888
889 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities'; echo
890 200 Script output follows
891
892 lookup changegroupsubset branchmap pushkey unbundle=HG10GZ,HG10BZ,HG10UN
893
894 heads
895
896 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads'
897 200 Script output follows
898
899 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
900
901 branches
902
903 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches&nodes=0000000000000000000000000000000000000000'
904 200 Script output follows
905
906 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
907
908 changegroup
909
910 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup&roots=0000000000000000000000000000000000000000' \
911 > | $TESTDIR/printrepr.py
912 200 Script output follows
913
914 x\x9c\xbdTMHUA\x14\xbe\xa8\xf9\xec\xda&\x10\x11*\xb8\x88\x81\x99\xbef\xe6\xce\xbdw\xc6\xf2a\x16E\x1b\x11[%\x98\xcc\xaf\x8f\x8c\xf7\xc0\xf7\x82
915 4\x11KP2m\x95\xad*\xabE\x05AP\xd0\xc22Z\x14\xf9\x03\xb9j\xa3\x9b$\xa4MJ\xb4\x90\xc0\x9a\x9bO0\x10\xdf\x13\xa2\x81\x0f\x869g\xe6|\xe7\x9c\xef\x8ceY\xf7\xa2KO\xd2\xb7K\x16~\
916 \xe9\xad\x90w\x86\xab\x93W\x8e\xdf\xb0r\\Y\xee6(\xa2)\xf6\x95\xc6\x01\xe4\x1az\x80R\xe8kN\x98\xe7R\xa4\xa9K@\xe0!A\xb4k\xa7U*m\x03\x07\xd8\x92\x1d\xd2\xc9\xa4\x1d\xc2\xe6,\xa5\xcc+\x1f\xef\xafDgi\xef\xab\x1d\x1d\xb7\x9a\xe7[W\xfbc\x8f\xde-\xcd\xe7\xcaz\xb3\xbb\x19\xd3\x81\x10>c>\x08\x00"X\x11\xc2\x84@\xd2\xe7B*L\x00\x01P\x04R\xc3@\xbaB0\xdb8#\x83:\x83\xa2h\xbc=\xcd\xdaS\xe1Y,L\xd3\xa0\xf2\xa8\x94J:\xe6\xd8\x81Q\xe0\xe8d\xa7#\xe2,\xd1\xaeR*\xed \xa5\x01\x13\x01\xa6\x0cb\xe3;\xbe\xaf\xfcK[^wK\xe1N\xaf\xbbk\xe8B\xd1\xf4\xc1\x07\xb3\xab[\x10\xfdkmvwcB\xa6\xa4\xd4G\xc4D\xc2\x141\xad\x91\x10\x00\x08J\x81\xcb}\xee\t\xee+W\xba\x8a\x80\x90|\xd4\xa0\xd6\xa0\xd4T\xde\xe1\x9d,!\xe2\xb5\xa94\xe3\xe7\xd5\x9f\x06\x18\xcba\x03aP\xb8f\xcd\x04\x1a_\\9\xf1\xed\xe4\x9e\xe5\xa6\xd1\xd2\x9f\x03\xa7o\xae\x90H\xf3\xfb\xef\xffH3\xadk
917 \xb0\x90\x92\x88\xb9\x14"\x068\xc2\x1e@\x00\xbb\x8a)\xd3\'\x859
918 \xa8\x80\x84S \xa5\xbd-g\x13`\xe4\xdc\xc3H^\xdf\xe2\xc0TM\xc7\xf4BO\xcf\xde\xae\xe5\xae#\x1frM(K\x97`F\x19\x16s\x05GD\xb9\x01\xc1\x00+\x8c|\x9fp\xc11\xf0\x14\x00\x9cJ\x82<\xe0\x12\x9f\xc1\x90\xd0\xf5\xc8\x19>Pr\xaa\xeaW\xf5\xc4\xae\xd1\xfc\x17\xcf\'\x13u\xb1\x9e\xcdHnC\x0e\xcc`\xc8\xa0&\xac\x0e\xf1|\x8c\x10$\xc4\x8c\xa2p\x05`\xdc\x08 \x80\xc4\xd7Rr-\x94\x10\x102\xedi;\xf3f\xf1z\x16\x86\xdb\xd8d\xe5\xe7\x8b\xf5\x8d\rzp\xb2\xfe\xac\xf5\xf2\xd3\xfe\xfckws\xedt\x96b\xd5l\x1c\x0b\x85\xb5\x170\x8f\x11\x84\xb0\x8f\x19\xa0\x00\t_\x07\x1ac\xa2\xc3\x89Z\xe7\x96\xf9 \xccNFg\xc7F\xaa\x8a+\x9a\x9cc_\x17\x1b\x17\x9e]z38<\x97+\xb5,",\xc8\xc8?\\\x91\xff\x17.~U\x96\x97\xf5%\xdeN<\x8e\xf5\x97%\xe7^\xcfL\xed~\xda\x96k\xdc->\x86\x02\x83"\x96H\xa6\xe3\xaas=-\xeb7\xe5\xda\x8f\xbc
919
920 stream_out
921
922 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out'
923 200 Script output follows
924
925 1
926
927 failing unbundle, requires POST request
928
929 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=unbundle'
930 405 push requires POST request
931
932 0
933 push requires POST request
934 [1]
935
936 Static files
937
938 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css'
939 200 Script output follows
940
941 a { text-decoration:none; }
942 .age { white-space:nowrap; }
943 .date { white-space:nowrap; }
944 .indexlinks { white-space:nowrap; }
945 .parity0 { background-color: #ddd; }
946 .parity1 { background-color: #eee; }
947 .lineno { width: 60px; color: #aaa; font-size: smaller;
948 text-align: right; }
949 .plusline { color: green; }
950 .minusline { color: red; }
951 .atline { color: purple; }
952 .annotate { font-size: smaller; text-align: right; padding-right: 1em; }
953 .buttons a {
954 background-color: #666;
955 padding: 2pt;
956 color: white;
957 font-family: sans;
958 font-weight: bold;
959 }
960 .navigate a {
961 background-color: #ccc;
962 padding: 2pt;
963 font-family: sans;
964 color: black;
965 }
966
967 .metatag {
968 background-color: #888;
969 color: white;
970 text-align: right;
971 }
972
973 /* Common */
974 pre { margin: 0; }
975
976 .logo {
977 float: right;
978 clear: right;
979 }
980
981 /* Changelog/Filelog entries */
982 .logEntry { width: 100%; }
983 .logEntry .age { width: 15%; }
984 .logEntry th { font-weight: normal; text-align: right; vertical-align: top; }
985 .logEntry th.age, .logEntry th.firstline { font-weight: bold; }
986 .logEntry th.firstline { text-align: left; width: inherit; }
987
988 /* Shortlog entries */
989 .slogEntry { width: 100%; }
990 .slogEntry .age { width: 8em; }
991 .slogEntry td { font-weight: normal; text-align: left; vertical-align: top; }
992 .slogEntry td.author { width: 15em; }
993
994 /* Tag entries */
995 #tagEntries { list-style: none; margin: 0; padding: 0; }
996 #tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; }
997
998 /* Changeset entry */
999 #changesetEntry { }
1000 #changesetEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
1001 #changesetEntry th.files, #changesetEntry th.description { vertical-align: top; }
1002
1003 /* File diff view */
1004 #filediffEntry { }
1005 #filediffEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
1006
1007 /* Graph */
1008 div#wrapper {
1009 position: relative;
1010 margin: 0;
1011 padding: 0;
1012 }
1013
1014 canvas {
1015 position: absolute;
1016 z-index: 5;
1017 top: -0.6em;
1018 margin: 0;
1019 }
1020
1021 ul#nodebgs {
1022 list-style: none inside none;
1023 padding: 0;
1024 margin: 0;
1025 top: -0.7em;
1026 }
1027
1028 ul#graphnodes li, ul#nodebgs li {
1029 height: 39px;
1030 }
1031
1032 ul#graphnodes {
1033 position: absolute;
1034 z-index: 10;
1035 top: -0.85em;
1036 list-style: none inside none;
1037 padding: 0;
1038 }
1039
1040 ul#graphnodes li .info {
1041 display: block;
1042 font-size: 70%;
1043 position: relative;
1044 top: -1px;
1045 }
1046
1047 Stop and restart with HGENCODING=cp932
1048
1049 $ "$TESTDIR/killdaemons.py"
1050 $ HGENCODING=cp932 hg serve --config server.uncompressed=False -n test \
1051 > -p $HGPORT -d --pid-file=hg.pid -E errors.log
1052 $ cat hg.pid >> $DAEMON_PIDS
1053
1054 commit message with Japanese Kanji 'Noh', which ends with '\x5c'
1055
1056 $ echo foo >> foo
1057 $ HGENCODING=cp932 hg ci -m `python -c 'print("\x94\x5c")'`
1058
1059 Graph json escape of multibyte character
1060
1061 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/' \
1062 > | grep '^var data ='
1063 var data = [["40b4d6888e92", [0, 1], [[0, 0, 1]], "\u80fd", "test", "1970-01-01", ["stable", true], ["tip"]], ["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", false], []], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"]]];
1064
1065 ERRORS ENCOUNTERED
1066
1067 $ cat errors.log