annotate tests/test-highlight.t @ 24563:830280536946

json: implement {changeset} template Output only contains basic changeset information for the moment. The format is compatible with `hg log -Tjson`.
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 31 Mar 2015 22:35:12 -0700
parents fdf7794be41d
children 3d82c517b9c5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22046
7a9cbb315d84 tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents: 21120
diff changeset
1 #require pygments serve
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
2
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
3 $ cat <<EOF >> $HGRCPATH
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
4 > [extensions]
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
5 > highlight =
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
6 > [web]
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
7 > pygments_style = friendly
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
8 > EOF
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
9 $ hg init test
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
10 $ cd test
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
11
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
12 create random Python file to exercise Pygments
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
13
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
14 $ cat <<EOF > primes.py
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
15 > #!/usr/bin/env python
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
16 >
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
17 > """Fun with generators. Corresponding Haskell implementation:
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
18 >
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
19 > primes = 2 : sieve [3, 5..]
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
20 > where sieve (p:ns) = p : sieve [n | n <- ns, mod n p /= 0]
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
21 > """
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
22 >
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
23 > from itertools import dropwhile, ifilter, islice, count, chain
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
24 >
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
25 > def primes():
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
26 > """Generate all primes."""
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
27 > def sieve(ns):
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
28 > p = ns.next()
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
29 > # It is important to yield *here* in order to stop the
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
30 > # infinite recursion.
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
31 > yield p
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
32 > ns = ifilter(lambda n: n % p != 0, ns)
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
33 > for n in sieve(ns):
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
34 > yield n
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
35 >
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
36 > odds = ifilter(lambda i: i % 2 == 1, count())
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
37 > return chain([2], sieve(dropwhile(lambda n: n < 3, odds)))
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
38 >
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
39 > if __name__ == "__main__":
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
40 > import sys
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
41 > try:
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
42 > n = int(sys.argv[1])
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
43 > except (ValueError, IndexError):
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
44 > n = 10
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
45 > p = primes()
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
46 > print "The first %d primes: %s" % (n, list(islice(p, n)))
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
47 > EOF
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
48 $ hg ci -Ama
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
49 adding primes.py
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8083
diff changeset
50
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
51 hg serve
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8083
diff changeset
52
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
53 $ hg serve -p $HGPORT -d -n test --pid-file=hg.pid -A access.log -E errors.log
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
54 $ cat hg.pid >> $DAEMON_PIDS
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8083
diff changeset
55
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
56 hgweb filerevision, html
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8083
diff changeset
57
17017
953faba28e91 tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
58 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/primes.py') \
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
59 > | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mf\"/class=\"mi\"/g"
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
60 200 Script output follows
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
61
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
62 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
63 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
64 <head>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
65 <link rel="icon" href="/static/hgicon.png" type="image/png" />
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
66 <meta name="robots" content="index, nofollow" />
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
67 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
14053
139fb11210bb fix broken tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 13618
diff changeset
68 <script type="text/javascript" src="/static/mercurial.js"></script>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
69
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
70 <link rel="stylesheet" href="/highlightcss" type="text/css" />
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
71 <title>test: 853dcd4de2a6 primes.py</title>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
72 </head>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
73 <body>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
74
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
75 <div class="container">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
76 <div class="menu">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
77 <div class="logo">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
78 <a href="http://mercurial.selenic.com/">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
79 <img src="/static/hglogo.png" alt="mercurial" /></a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
80 </div>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
81 <ul>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
82 <li><a href="/shortlog/853dcd4de2a6">log</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
83 <li><a href="/graph/853dcd4de2a6">graph</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
84 <li><a href="/tags">tags</a></li>
21120
9ea9e94c7492 hgweb: fix lack of "bookmarks" link in "/file" page of "paper" style
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 20598
diff changeset
85 <li><a href="/bookmarks">bookmarks</a></li>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
86 <li><a href="/branches">branches</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
87 </ul>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
88 <ul>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
89 <li><a href="/rev/853dcd4de2a6">changeset</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
90 <li><a href="/file/853dcd4de2a6/">browse</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
91 </ul>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
92 <ul>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
93 <li class="active">file</li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
94 <li><a href="/file/tip/primes.py">latest</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
95 <li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
17202
1ae119269ddc hgweb: side-by-side comparison functionality
wujek srujek
parents: 17017
diff changeset
96 <li><a href="/comparison/853dcd4de2a6/primes.py">comparison</a></li>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
97 <li><a href="/annotate/853dcd4de2a6/primes.py">annotate</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
98 <li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
99 <li><a href="/raw-file/853dcd4de2a6/primes.py">raw</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
100 </ul>
12680
d664547ef540 hgweb: add help link to templates missed in ead4e21f49f1
Augie Fackler <durin42@gmail.com>
parents: 12445
diff changeset
101 <ul>
d664547ef540 hgweb: add help link to templates missed in ead4e21f49f1
Augie Fackler <durin42@gmail.com>
parents: 12445
diff changeset
102 <li><a href="/help">help</a></li>
d664547ef540 hgweb: add help link to templates missed in ead4e21f49f1
Augie Fackler <durin42@gmail.com>
parents: 12445
diff changeset
103 </ul>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
104 </div>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
105
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
106 <div class="main">
18291
5db16424142c tests: fix up test-highlight for breadcrumb changes
Matt Mackall <mpm@selenic.com>
parents: 17466
diff changeset
107 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
108 <h3>view primes.py @ 0:853dcd4de2a6</h3>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
109
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
110 <form class="search" action="/log">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
111
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
112 <p><input name="rev" id="search1" type="text" size="30" /></p>
19796
544848ef65f2 paper: edit search hint to include new feature description
Alexander Plavin <alexander@plav.in>
parents: 19795
diff changeset
113 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
544848ef65f2 paper: edit search hint to include new feature description
Alexander Plavin <alexander@plav.in>
parents: 19795
diff changeset
114 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
115 </form>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
116
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
117 <div class="description">a</div>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
118
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
119 <table id="changesetEntry">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
120 <tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
121 <th class="author">author</th>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
122 <td class="author">&#116;&#101;&#115;&#116;</td>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
123 </tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
124 <tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
125 <th class="date">date</th>
15375
fe9d36a6853e hgweb: fix dynamic date calculation not working under Safari
Brodie Rao <brodie@bitheap.org>
parents: 15243
diff changeset
126 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
127 </tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
128 <tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
129 <th class="author">parents</th>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
130 <td class="author"></td>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
131 </tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
132 <tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
133 <th class="author">children</th>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
134 <td class="author"></td>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
135 </tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
136 </table>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
137
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
138 <div class="overflow">
19430
5ec5097b4c0f hgweb: add line wrapping switch to file source view
Alexander Plavin <me@aplavin.ru>
parents: 19387
diff changeset
139 <div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
140 <div class="sourcefirst"> line source</div>
19431
b8ecc3830c89 hgweb: introduce separate classes for stripey background
Alexander Plavin <me@aplavin.ru>
parents: 19430
diff changeset
141 <pre class="sourcelines stripes4 wrap">
19387
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
142 <span id="l1"><span class="c">#!/usr/bin/env python</span></span><a href="#l1"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
143 <span id="l2"></span><a href="#l2"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
144 <span id="l3"><span class="sd">&quot;&quot;&quot;Fun with generators. Corresponding Haskell implementation:</span></span><a href="#l3"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
145 <span id="l4"></span><a href="#l4"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
146 <span id="l5"><span class="sd">primes = 2 : sieve [3, 5..]</span></span><a href="#l5"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
147 <span id="l6"><span class="sd"> where sieve (p:ns) = p : sieve [n | n &lt;- ns, mod n p /= 0]</span></span><a href="#l6"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
148 <span id="l7"><span class="sd">&quot;&quot;&quot;</span></span><a href="#l7"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
149 <span id="l8"></span><a href="#l8"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
150 <span id="l9"><span class="kn">from</span> <span class="nn">itertools</span> <span class="kn">import</span> <span class="n">dropwhile</span><span class="p">,</span> <span class="n">ifilter</span><span class="p">,</span> <span class="n">islice</span><span class="p">,</span> <span class="n">count</span><span class="p">,</span> <span class="n">chain</span></span><a href="#l9"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
151 <span id="l10"></span><a href="#l10"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
152 <span id="l11"><span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></span><a href="#l11"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
153 <span id="l12"> <span class="sd">&quot;&quot;&quot;Generate all primes.&quot;&quot;&quot;</span></span><a href="#l12"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
154 <span id="l13"> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></span><a href="#l13"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
155 <span id="l14"> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></span><a href="#l14"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
156 <span id="l15"> <span class="c"># It is important to yield *here* in order to stop the</span></span><a href="#l15"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
157 <span id="l16"> <span class="c"># infinite recursion.</span></span><a href="#l16"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
158 <span id="l17"> <span class="kn">yield</span> <span class="n">p</span></span><a href="#l17"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
159 <span id="l18"> <span class="n">ns</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">%</span> <span class="n">p</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">ns</span><span class="p">)</span></span><a href="#l18"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
160 <span id="l19"> <span class="kn">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></span><a href="#l19"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
161 <span id="l20"> <span class="kn">yield</span> <span class="n">n</span></span><a href="#l20"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
162 <span id="l21"></span><a href="#l21"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
163 <span id="l22"> <span class="n">odds</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">i</span><span class="p">:</span> <span class="n">i</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="n">count</span><span class="p">())</span></span><a href="#l22"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
164 <span id="l23"> <span class="kn">return</span> <span class="n">chain</span><span class="p">([</span><span class="mi">2</span><span class="p">],</span> <span class="n">sieve</span><span class="p">(</span><span class="n">dropwhile</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">&lt;</span> <span class="mi">3</span><span class="p">,</span> <span class="n">odds</span><span class="p">)))</span></span><a href="#l23"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
165 <span id="l24"></span><a href="#l24"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
166 <span id="l25"><span class="kn">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">&quot;__main__&quot;</span><span class="p">:</span></span><a href="#l25"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
167 <span id="l26"> <span class="kn">import</span> <span class="nn">sys</span></span><a href="#l26"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
168 <span id="l27"> <span class="kn">try</span><span class="p">:</span></span><a href="#l27"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
169 <span id="l28"> <span class="n">n</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span></span><a href="#l28"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
170 <span id="l29"> <span class="kn">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">):</span></span><a href="#l29"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
171 <span id="l30"> <span class="n">n</span> <span class="o">=</span> <span class="mi">10</span></span><a href="#l30"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
172 <span id="l31"> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></span><a href="#l31"></a>
f2e4fdb3dd27 hgweb: code selection without line numbers in file source view
Alexander Plavin <me@aplavin.ru>
parents: 18291
diff changeset
173 <span id="l32"> <span class="kn">print</span> <span class="s">&quot;The first </span><span class="si">%d</span><span class="s"> primes: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="nb">list</span><span class="p">(</span><span class="n">islice</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">n</span><span class="p">)))</span></span><a href="#l32"></a></pre>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
174 <div class="sourcelast"></div>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
175 </div>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
176 </div>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
177 </div>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
178
14053
139fb11210bb fix broken tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 13618
diff changeset
179 <script type="text/javascript">process_dates()</script>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
180
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
181
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
182 </body>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
183 </html>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
184
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8083
diff changeset
185
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
186 hgweb fileannotate, html
6987
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6863
diff changeset
187
17017
953faba28e91 tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
188 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'annotate/tip/primes.py') \
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
189 > | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mi\"/class=\"mf\"/g"
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
190 200 Script output follows
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
191
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
192 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
193 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
194 <head>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
195 <link rel="icon" href="/static/hgicon.png" type="image/png" />
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
196 <meta name="robots" content="index, nofollow" />
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
197 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
14053
139fb11210bb fix broken tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 13618
diff changeset
198 <script type="text/javascript" src="/static/mercurial.js"></script>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
199
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
200 <link rel="stylesheet" href="/highlightcss" type="text/css" />
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
201 <title>test: primes.py annotate</title>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
202 </head>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
203 <body>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
204
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
205 <div class="container">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
206 <div class="menu">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
207 <div class="logo">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
208 <a href="http://mercurial.selenic.com/">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
209 <img src="/static/hglogo.png" alt="mercurial" /></a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
210 </div>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
211 <ul>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
212 <li><a href="/shortlog/853dcd4de2a6">log</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
213 <li><a href="/graph/853dcd4de2a6">graph</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
214 <li><a href="/tags">tags</a></li>
13618
b217619a6cf5 test-highlight: fix test output (introduced by 2151703e7f84)
Patrick Mezard <pmezard@gmail.com>
parents: 12943
diff changeset
215 <li><a href="/bookmarks">bookmarks</a></li>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
216 <li><a href="/branches">branches</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
217 </ul>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
218
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
219 <ul>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
220 <li><a href="/rev/853dcd4de2a6">changeset</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
221 <li><a href="/file/853dcd4de2a6/">browse</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
222 </ul>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
223 <ul>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
224 <li><a href="/file/853dcd4de2a6/primes.py">file</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
225 <li><a href="/file/tip/primes.py">latest</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
226 <li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
17202
1ae119269ddc hgweb: side-by-side comparison functionality
wujek srujek
parents: 17017
diff changeset
227 <li><a href="/comparison/853dcd4de2a6/primes.py">comparison</a></li>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
228 <li class="active">annotate</li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
229 <li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
230 <li><a href="/raw-annotate/853dcd4de2a6/primes.py">raw</a></li>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
231 </ul>
12680
d664547ef540 hgweb: add help link to templates missed in ead4e21f49f1
Augie Fackler <durin42@gmail.com>
parents: 12445
diff changeset
232 <ul>
d664547ef540 hgweb: add help link to templates missed in ead4e21f49f1
Augie Fackler <durin42@gmail.com>
parents: 12445
diff changeset
233 <li><a href="/help">help</a></li>
d664547ef540 hgweb: add help link to templates missed in ead4e21f49f1
Augie Fackler <durin42@gmail.com>
parents: 12445
diff changeset
234 </ul>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
235 </div>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
236
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
237 <div class="main">
18291
5db16424142c tests: fix up test-highlight for breadcrumb changes
Matt Mackall <mpm@selenic.com>
parents: 17466
diff changeset
238 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
239 <h3>annotate primes.py @ 0:853dcd4de2a6</h3>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
240
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
241 <form class="search" action="/log">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
242
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
243 <p><input name="rev" id="search1" type="text" size="30" /></p>
19796
544848ef65f2 paper: edit search hint to include new feature description
Alexander Plavin <alexander@plav.in>
parents: 19795
diff changeset
244 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
544848ef65f2 paper: edit search hint to include new feature description
Alexander Plavin <alexander@plav.in>
parents: 19795
diff changeset
245 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
246 </form>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
247
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
248 <div class="description">a</div>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
249
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
250 <table id="changesetEntry">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
251 <tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
252 <th class="author">author</th>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
253 <td class="author">&#116;&#101;&#115;&#116;</td>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
254 </tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
255 <tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
256 <th class="date">date</th>
15375
fe9d36a6853e hgweb: fix dynamic date calculation not working under Safari
Brodie Rao <brodie@bitheap.org>
parents: 15243
diff changeset
257 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
258 </tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
259 <tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
260 <th class="author">parents</th>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
261 <td class="author"></td>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
262 </tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
263 <tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
264 <th class="author">children</th>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
265 <td class="author"></td>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
266 </tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
267 </table>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
268
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
269 <div class="overflow">
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
270 <table class="bigtable">
24054
fdf7794be41d hgweb: replace implicit <tbody> with explicit <thead> where appropriate
Anton Shestakov <engored@ya.ru>
parents: 22947
diff changeset
271 <thead>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
272 <tr>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
273 <th class="annotate">rev</th>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
274 <th class="line">&nbsp;&nbsp;line source</th>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
275 </tr>
24054
fdf7794be41d hgweb: replace implicit <tbody> with explicit <thead> where appropriate
Anton Shestakov <engored@ya.ru>
parents: 22947
diff changeset
276 </thead>
19449
9f471af285a9 hgweb: make stripes in file annotate view with CSS
Alexander Plavin <me@aplavin.ru>
parents: 19431
diff changeset
277 <tbody class="stripes2">
9f471af285a9 hgweb: make stripes in file annotate view with CSS
Alexander Plavin <me@aplavin.ru>
parents: 19431
diff changeset
278
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
279 <tr id="l1">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
280 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
281 <a href="/annotate/853dcd4de2a6/primes.py#l1"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
282 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
283 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
284 <td class="source"><a href="#l1"> 1</a> <span class="c">#!/usr/bin/env python</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
285 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
286 <tr id="l2">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
287 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
288 <a href="/annotate/853dcd4de2a6/primes.py#l2"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
289 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
290 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
291 <td class="source"><a href="#l2"> 2</a> </td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
292 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
293 <tr id="l3">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
294 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
295 <a href="/annotate/853dcd4de2a6/primes.py#l3"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
296 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
297 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
298 <td class="source"><a href="#l3"> 3</a> <span class="sd">&quot;&quot;&quot;Fun with generators. Corresponding Haskell implementation:</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
299 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
300 <tr id="l4">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
301 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
302 <a href="/annotate/853dcd4de2a6/primes.py#l4"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
303 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
304 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
305 <td class="source"><a href="#l4"> 4</a> </td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
306 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
307 <tr id="l5">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
308 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
309 <a href="/annotate/853dcd4de2a6/primes.py#l5"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
310 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
311 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
312 <td class="source"><a href="#l5"> 5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
313 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
314 <tr id="l6">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
315 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
316 <a href="/annotate/853dcd4de2a6/primes.py#l6"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
317 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
318 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
319 <td class="source"><a href="#l6"> 6</a> <span class="sd"> where sieve (p:ns) = p : sieve [n | n &lt;- ns, mod n p /= 0]</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
320 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
321 <tr id="l7">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
322 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
323 <a href="/annotate/853dcd4de2a6/primes.py#l7"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
324 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
325 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
326 <td class="source"><a href="#l7"> 7</a> <span class="sd">&quot;&quot;&quot;</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
327 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
328 <tr id="l8">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
329 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
330 <a href="/annotate/853dcd4de2a6/primes.py#l8"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
331 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
332 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
333 <td class="source"><a href="#l8"> 8</a> </td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
334 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
335 <tr id="l9">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
336 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
337 <a href="/annotate/853dcd4de2a6/primes.py#l9"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
338 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
339 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
340 <td class="source"><a href="#l9"> 9</a> <span class="kn">from</span> <span class="nn">itertools</span> <span class="kn">import</span> <span class="n">dropwhile</span><span class="p">,</span> <span class="n">ifilter</span><span class="p">,</span> <span class="n">islice</span><span class="p">,</span> <span class="n">count</span><span class="p">,</span> <span class="n">chain</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
341 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
342 <tr id="l10">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
343 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
344 <a href="/annotate/853dcd4de2a6/primes.py#l10"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
345 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
346 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
347 <td class="source"><a href="#l10"> 10</a> </td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
348 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
349 <tr id="l11">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
350 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
351 <a href="/annotate/853dcd4de2a6/primes.py#l11"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
352 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
353 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
354 <td class="source"><a href="#l11"> 11</a> <span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
355 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
356 <tr id="l12">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
357 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
358 <a href="/annotate/853dcd4de2a6/primes.py#l12"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
359 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
360 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
361 <td class="source"><a href="#l12"> 12</a> <span class="sd">&quot;&quot;&quot;Generate all primes.&quot;&quot;&quot;</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
362 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
363 <tr id="l13">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
364 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
365 <a href="/annotate/853dcd4de2a6/primes.py#l13"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
366 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
367 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
368 <td class="source"><a href="#l13"> 13</a> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
369 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
370 <tr id="l14">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
371 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
372 <a href="/annotate/853dcd4de2a6/primes.py#l14"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
373 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
374 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
375 <td class="source"><a href="#l14"> 14</a> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
376 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
377 <tr id="l15">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
378 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
379 <a href="/annotate/853dcd4de2a6/primes.py#l15"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
380 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
381 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
382 <td class="source"><a href="#l15"> 15</a> <span class="c"># It is important to yield *here* in order to stop the</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
383 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
384 <tr id="l16">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
385 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
386 <a href="/annotate/853dcd4de2a6/primes.py#l16"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
387 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
388 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
389 <td class="source"><a href="#l16"> 16</a> <span class="c"># infinite recursion.</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
390 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
391 <tr id="l17">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
392 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
393 <a href="/annotate/853dcd4de2a6/primes.py#l17"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
394 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
395 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
396 <td class="source"><a href="#l17"> 17</a> <span class="kn">yield</span> <span class="n">p</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
397 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
398 <tr id="l18">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
399 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
400 <a href="/annotate/853dcd4de2a6/primes.py#l18"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
401 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
402 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
403 <td class="source"><a href="#l18"> 18</a> <span class="n">ns</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">%</span> <span class="n">p</span> <span class="o">!=</span> <span class="mf">0</span><span class="p">,</span> <span class="n">ns</span><span class="p">)</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
404 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
405 <tr id="l19">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
406 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
407 <a href="/annotate/853dcd4de2a6/primes.py#l19"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
408 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
409 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
410 <td class="source"><a href="#l19"> 19</a> <span class="kn">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
411 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
412 <tr id="l20">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
413 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
414 <a href="/annotate/853dcd4de2a6/primes.py#l20"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
415 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
416 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
417 <td class="source"><a href="#l20"> 20</a> <span class="kn">yield</span> <span class="n">n</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
418 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
419 <tr id="l21">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
420 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
421 <a href="/annotate/853dcd4de2a6/primes.py#l21"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
422 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
423 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
424 <td class="source"><a href="#l21"> 21</a> </td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
425 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
426 <tr id="l22">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
427 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
428 <a href="/annotate/853dcd4de2a6/primes.py#l22"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
429 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
430 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
431 <td class="source"><a href="#l22"> 22</a> <span class="n">odds</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">i</span><span class="p">:</span> <span class="n">i</span> <span class="o">%</span> <span class="mf">2</span> <span class="o">==</span> <span class="mf">1</span><span class="p">,</span> <span class="n">count</span><span class="p">())</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
432 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
433 <tr id="l23">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
434 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
435 <a href="/annotate/853dcd4de2a6/primes.py#l23"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
436 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
437 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
438 <td class="source"><a href="#l23"> 23</a> <span class="kn">return</span> <span class="n">chain</span><span class="p">([</span><span class="mf">2</span><span class="p">],</span> <span class="n">sieve</span><span class="p">(</span><span class="n">dropwhile</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">&lt;</span> <span class="mf">3</span><span class="p">,</span> <span class="n">odds</span><span class="p">)))</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
439 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
440 <tr id="l24">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
441 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
442 <a href="/annotate/853dcd4de2a6/primes.py#l24"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
443 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
444 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
445 <td class="source"><a href="#l24"> 24</a> </td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
446 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
447 <tr id="l25">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
448 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
449 <a href="/annotate/853dcd4de2a6/primes.py#l25"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
450 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
451 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
452 <td class="source"><a href="#l25"> 25</a> <span class="kn">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">&quot;__main__&quot;</span><span class="p">:</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
453 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
454 <tr id="l26">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
455 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
456 <a href="/annotate/853dcd4de2a6/primes.py#l26"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
457 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
458 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
459 <td class="source"><a href="#l26"> 26</a> <span class="kn">import</span> <span class="nn">sys</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
460 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
461 <tr id="l27">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
462 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
463 <a href="/annotate/853dcd4de2a6/primes.py#l27"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
464 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
465 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
466 <td class="source"><a href="#l27"> 27</a> <span class="kn">try</span><span class="p">:</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
467 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
468 <tr id="l28">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
469 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
470 <a href="/annotate/853dcd4de2a6/primes.py#l28"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
471 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
472 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
473 <td class="source"><a href="#l28"> 28</a> <span class="n">n</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">1</span><span class="p">])</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
474 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
475 <tr id="l29">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
476 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
477 <a href="/annotate/853dcd4de2a6/primes.py#l29"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
478 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
479 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
480 <td class="source"><a href="#l29"> 29</a> <span class="kn">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">):</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
481 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
482 <tr id="l30">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
483 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
484 <a href="/annotate/853dcd4de2a6/primes.py#l30"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
485 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
486 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
487 <td class="source"><a href="#l30"> 30</a> <span class="n">n</span> <span class="o">=</span> <span class="mf">10</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
488 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
489 <tr id="l31">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
490 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
491 <a href="/annotate/853dcd4de2a6/primes.py#l31"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
492 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
493 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
494 <td class="source"><a href="#l31"> 31</a> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
495 </tr>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
496 <tr id="l32">
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
497 <td class="annotate">
16577
f208a4e20018 paper, monoblue: link correctly to lines in annotate view
Martin Geisler <mg@aragost.com>
parents: 15446
diff changeset
498 <a href="/annotate/853dcd4de2a6/primes.py#l32"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
499 title="853dcd4de2a6: a">test@0</a>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
500 </td>
19463
f3393d458bf5 hgweb: highlight line which is linked to at annotate view
Alexander Plavin <me@aplavin.ru>
parents: 19449
diff changeset
501 <td class="source"><a href="#l32"> 32</a> <span class="kn">print</span> <span class="s">&quot;The first </span><span class="si">%d</span><span class="s"> primes: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="nb">list</span><span class="p">(</span><span class="n">islice</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">n</span><span class="p">)))</span></td>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
502 </tr>
19449
9f471af285a9 hgweb: make stripes in file annotate view with CSS
Alexander Plavin <me@aplavin.ru>
parents: 19431
diff changeset
503 </tbody>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
504 </table>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
505 </div>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
506 </div>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
507 </div>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
508
14053
139fb11210bb fix broken tests
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 13618
diff changeset
509 <script type="text/javascript">process_dates()</script>
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
510
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
511
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
512 </body>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
513 </html>
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
514
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
515
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
516 hgweb fileannotate, raw
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
517
17017
953faba28e91 tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
518 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'annotate/tip/primes.py?style=raw') \
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
519 > | sed "s/test@//" > a
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
520 $ echo "200 Script output follows" > b
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
521 $ echo "" >> b
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
522 $ echo "" >> b
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
523 $ hg annotate "primes.py" >> b
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
524 $ echo "" >> b
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
525 $ echo "" >> b
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
526 $ echo "" >> b
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
527 $ echo "" >> b
20598
e57e2da803aa solaris: diff -u emits "No differences encountered"
Danek Duvall <danek.duvall@oracle.com>
parents: 19796
diff changeset
528 $ cmp b a || diff -u b a
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
529
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
530 hgweb filerevision, raw
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
531
17017
953faba28e91 tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
532 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/primes.py?style=raw') \
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
533 > > a
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
534 $ echo "200 Script output follows" > b
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
535 $ echo "" >> b
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
536 $ hg cat primes.py >> b
20598
e57e2da803aa solaris: diff -u emits "No differences encountered"
Danek Duvall <danek.duvall@oracle.com>
parents: 19796
diff changeset
537 $ cmp b a || diff -u b a
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
538
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
539 hgweb highlightcss friendly
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
540
17017
953faba28e91 tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
541 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'highlightcss' > out
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
542 $ head -n 4 out
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
543 200 Script output follows
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
544
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
545 /* pygments_style = friendly */
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
546
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
547 $ rm out
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
548
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
549 errors encountered
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
550
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
551 $ cat errors.log
17466
d5a3bda6e170 killdaemons: take file argument explicitely
Patrick Mezard <patrick@mezard.eu>
parents: 17202
diff changeset
552 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
553
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
554 Change the pygments style
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
555
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
556 $ cat > .hg/hgrc <<EOF
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
557 > [web]
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
558 > pygments_style = fruity
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
559 > EOF
9424
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8485
diff changeset
560
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
561 hg serve again
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
562
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
563 $ hg serve -p $HGPORT -d -n test --pid-file=hg.pid -A access.log -E errors.log
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
564 $ cat hg.pid >> $DAEMON_PIDS
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
565
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
566 hgweb highlightcss fruity
9424
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8485
diff changeset
567
17017
953faba28e91 tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
568 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'highlightcss' > out
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
569 $ head -n 4 out
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
570 200 Script output follows
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
571
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
572 /* pygments_style = fruity */
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
573
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
574 $ rm out
9424
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8485
diff changeset
575
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
576 errors encountered
9424
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8485
diff changeset
577
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
578 $ cat errors.log
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
579 $ cd ..
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
580 $ hg init eucjp
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
581 $ cd eucjp
22947
c63a09b6b337 tests: use $PYTHON instead of hardcoding python
Augie Fackler <raf@durin42.com>
parents: 22046
diff changeset
582 $ $PYTHON -c 'print("\265\376")' >> eucjp.txt # Japanese kanji "Kyo"
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
583 $ hg ci -Ama
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
584 adding eucjp.txt
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
585 $ hgserveget () {
17466
d5a3bda6e170 killdaemons: take file argument explicitely
Patrick Mezard <patrick@mezard.eu>
parents: 17202
diff changeset
586 > "$TESTDIR/killdaemons.py" $DAEMON_PIDS
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
587 > echo % HGENCODING="$1" hg serve
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
588 > HGENCODING="$1" hg serve -p $HGPORT -d -n test --pid-file=hg.pid -E errors.log
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
589 > cat hg.pid >> $DAEMON_PIDS
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
590 >
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
591 > echo % hgweb filerevision, html
17017
953faba28e91 tests: prepare get-with-headers.py for MSYS
Mads Kiilerich <mads@kiilerich.com>
parents: 16913
diff changeset
592 > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "file/tip/$2" \
12943
7439ea4146f8 tests: use (esc) instead of other kinds of string escaping
Mads Kiilerich <mads@kiilerich.com>
parents: 12680
diff changeset
593 > | grep '<div class="parity0 source">'
12445
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
594 > echo % errors encountered
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
595 > cat errors.log
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
596 > }
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
597 $ hgserveget euc-jp eucjp.txt
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
598 % HGENCODING=euc-jp hg serve
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
599 % hgweb filerevision, html
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
600 % errors encountered
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
601 $ hgserveget utf-8 eucjp.txt
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
602 % HGENCODING=utf-8 hg serve
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
603 % hgweb filerevision, html
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
604 % errors encountered
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
605 $ hgserveget us-ascii eucjp.txt
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
606 % HGENCODING=us-ascii hg serve
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
607 % hgweb filerevision, html
981ce49a243f tests: unify test-highlight
Matt Mackall <mpm@selenic.com>
parents: 10257
diff changeset
608 % errors encountered
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16577
diff changeset
609
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16577
diff changeset
610 $ cd ..