annotate tests/test-highlight.out @ 9637:64425c5a9257

cmdutil: minor refactoring of changeset_printer._show - use ctx.branch() instead of directly accessing the extra field "branch" - move definitions of locals ('extra' and 'branch') down to where they are used
author Adrian Buehlmann <adrian@cadifra.com>
date Sat, 24 Oct 2009 19:01:40 +0200
parents b42b03308ae9
children bb00a159e594
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
1 adding primes.py
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
2 % hg serve
6987
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
3 % hgweb filerevision, html
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
4 200 Script output follows
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
5
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
7 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
8 <head>
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
9 <link rel="icon" href="/static/hgicon.png" type="image/png" />
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
10 <meta name="robots" content="index, nofollow" />
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
11 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
12
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
13 <link rel="stylesheet" href="/highlightcss" type="text/css" />
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
14 <title>test: 853dcd4de2a6 primes.py</title>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
15 </head>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
16 <body>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
17
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
18 <div class="container">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
19 <div class="menu">
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
20 <div class="logo">
8936
1de6e7e1bb9f change wiki/bts URLs to point to new hostname
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8504
diff changeset
21 <a href="http://mercurial.selenic.com/">
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
22 <img src="/static/hglogo.png" alt="mercurial" /></a>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
23 </div>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
24 <ul>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
25 <li><a href="/shortlog/853dcd4de2a6">log</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
26 <li><a href="/graph/853dcd4de2a6">graph</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
27 <li><a href="/tags">tags</a></li>
8353
6058d291abdf paper/coal: add branches page
Sune Foldager <cryo@cyanite.org>
parents: 8083
diff changeset
28 <li><a href="/branches">branches</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
29 </ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
30 <ul>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
31 <li><a href="/rev/853dcd4de2a6">changeset</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
32 <li><a href="/file/853dcd4de2a6/">browse</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
33 </ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
34 <ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
35 <li class="active">file</li>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
36 <li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
37 <li><a href="/annotate/853dcd4de2a6/primes.py">annotate</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
38 <li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
39 <li><a href="/raw-file/853dcd4de2a6/primes.py">raw</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
40 </ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
41 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
42
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
43 <div class="main">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
44 <h2><a href="/">test</a></h2>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
45 <h3>view primes.py @ 0:853dcd4de2a6</h3>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
46
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
47 <form class="search" action="/log">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
48
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
49 <p><input name="rev" id="search1" type="text" size="30" /></p>
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
50 <div id="hint">find changesets by author, revision,
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
51 files, or words in the commit message</div>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
52 </form>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
53
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
54 <div class="description">a</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
55
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
56 <table id="changesetEntry">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
57 <tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
58 <th class="author">author</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
59 <td class="author">&#116;&#101;&#115;&#116;</td>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
60 </tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
61 <tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
62 <th class="date">date</th>
7544
c5e37dc38a52 test-hgweb-*: replace "XX years ago" by a fixed string in get-with-headers.py
Gilles Moris <gilles.moris@free.fr>
parents: 7395
diff changeset
63 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (many years ago)</td>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
64 </tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
65 <tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
66 <th class="author">parents</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
67 <td class="author"></td>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
68 </tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
69 <tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
70 <th class="author">children</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
71 <td class="author"></td>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
72 </tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
73
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
74 </table>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
75
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
76 <div class="overflow">
7395
e2048f5c7bf5 tests: fix tests broken by 03b60f2f90bf
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 7347
diff changeset
77 <div class="sourcefirst"> line source</div>
8486
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
78
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
79 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> <span class="c">#!/usr/bin/env python</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
80 <div class="parity1 source"><a href="#l2" id="l2"> 2</a> </div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
81 <div class="parity0 source"><a href="#l3" id="l3"> 3</a> <span class="sd">&quot;&quot;&quot;Fun with generators. Corresponding Haskell implementation:</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
82 <div class="parity1 source"><a href="#l4" id="l4"> 4</a> </div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
83 <div class="parity0 source"><a href="#l5" id="l5"> 5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
84 <div class="parity1 source"><a href="#l6" id="l6"> 6</a> <span class="sd"> where sieve (p:ns) = p : sieve [n | n &lt;- ns, mod n p /= 0]</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
85 <div class="parity0 source"><a href="#l7" id="l7"> 7</a> <span class="sd">&quot;&quot;&quot;</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
86 <div class="parity1 source"><a href="#l8" id="l8"> 8</a> </div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
87 <div class="parity0 source"><a href="#l9" id="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></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
88 <div class="parity1 source"><a href="#l10" id="l10"> 10</a> </div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
89 <div class="parity0 source"><a href="#l11" id="l11"> 11</a> <span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
90 <div class="parity1 source"><a href="#l12" id="l12"> 12</a> <span class="sd">&quot;&quot;&quot;Generate all primes.&quot;&quot;&quot;</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
91 <div class="parity0 source"><a href="#l13" id="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></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
92 <div class="parity1 source"><a href="#l14" id="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></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
93 <div class="parity0 source"><a href="#l15" id="l15"> 15</a> <span class="c"># It is important to yield *here* in order to stop the</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
94 <div class="parity1 source"><a href="#l16" id="l16"> 16</a> <span class="c"># infinite recursion.</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
95 <div class="parity0 source"><a href="#l17" id="l17"> 17</a> <span class="kn">yield</span> <span class="n">p</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
96 <div class="parity1 source"><a href="#l18" id="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="mi">0</span><span class="p">,</span> <span class="n">ns</span><span class="p">)</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
97 <div class="parity0 source"><a href="#l19" id="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></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
98 <div class="parity1 source"><a href="#l20" id="l20"> 20</a> <span class="kn">yield</span> <span class="n">n</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
99 <div class="parity0 source"><a href="#l21" id="l21"> 21</a> </div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
100 <div class="parity1 source"><a href="#l22" id="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="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></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
101 <div class="parity0 source"><a href="#l23" id="l23"> 23</a> <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></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
102 <div class="parity1 source"><a href="#l24" id="l24"> 24</a> </div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
103 <div class="parity0 source"><a href="#l25" id="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></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
104 <div class="parity1 source"><a href="#l26" id="l26"> 26</a> <span class="kn">import</span> <span class="nn">sys</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
105 <div class="parity0 source"><a href="#l27" id="l27"> 27</a> <span class="kn">try</span><span class="p">:</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
106 <div class="parity1 source"><a href="#l28" id="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="mi">1</span><span class="p">])</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
107 <div class="parity0 source"><a href="#l29" id="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></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
108 <div class="parity1 source"><a href="#l30" id="l30"> 30</a> <span class="n">n</span> <span class="o">=</span> <span class="mi">10</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
109 <div class="parity0 source"><a href="#l31" id="l31"> 31</a> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></div>
835b1ee111f4 coal, paper: add newlines when displaying a file in hgweb
Martin Geisler <mg@lazybytes.net>
parents: 8485
diff changeset
110 <div class="parity1 source"><a href="#l32" id="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></div>
7395
e2048f5c7bf5 tests: fix tests broken by 03b60f2f90bf
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 7347
diff changeset
111 <div class="sourcelast"></div>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
112 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
113 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
114 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
115
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
116
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
117
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
118 </body>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
119 </html>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
120
6987
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
121 % hgweb fileannotate, html
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
122 200 Script output follows
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
123
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
124 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
125 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
126 <head>
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
127 <link rel="icon" href="/static/hgicon.png" type="image/png" />
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
128 <meta name="robots" content="index, nofollow" />
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
129 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
130
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
131 <link rel="stylesheet" href="/highlightcss" type="text/css" />
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
132 <title>test: primes.py annotate</title>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
133 </head>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
134 <body>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
135
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
136 <div class="container">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
137 <div class="menu">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
138 <div class="logo">
8936
1de6e7e1bb9f change wiki/bts URLs to point to new hostname
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 8504
diff changeset
139 <a href="http://mercurial.selenic.com/">
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
140 <img src="/static/hglogo.png" alt="mercurial" /></a>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
141 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
142 <ul>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
143 <li><a href="/shortlog/853dcd4de2a6">log</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
144 <li><a href="/graph/853dcd4de2a6">graph</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
145 <li><a href="/tags">tags</a></li>
8353
6058d291abdf paper/coal: add branches page
Sune Foldager <cryo@cyanite.org>
parents: 8083
diff changeset
146 <li><a href="/branches">branches</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
147 </ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
148
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
149 <ul>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
150 <li><a href="/rev/853dcd4de2a6">changeset</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
151 <li><a href="/file/853dcd4de2a6/">browse</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
152 </ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
153 <ul>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
154 <li><a href="/file/853dcd4de2a6/primes.py">file</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
155 <li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
156 <li class="active">annotate</li>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
157 <li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
158 <li><a href="/raw-annotate/853dcd4de2a6/primes.py">raw</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
159 </ul>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
160 </div>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
161
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
162 <div class="main">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
163 <h2><a href="/">test</a></h2>
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
164 <h3>annotate primes.py @ 0:853dcd4de2a6</h3>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
165
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
166 <form class="search" action="/log">
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
167
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
168 <p><input name="rev" id="search1" type="text" size="30" /></p>
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
169 <div id="hint">find changesets by author, revision,
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
170 files, or words in the commit message</div>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
171 </form>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
172
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
173 <div class="description">a</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
174
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
175 <table id="changesetEntry">
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
176 <tr>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
177 <th class="author">author</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
178 <td class="author">&#116;&#101;&#115;&#116;</td>
6907
6dcbe191a9b5 Fix up tests
Matt Mackall <mpm@selenic.com>
parents: 6695
diff changeset
179 </tr>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
180 <tr>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
181 <th class="date">date</th>
7544
c5e37dc38a52 test-hgweb-*: replace "XX years ago" by a fixed string in get-with-headers.py
Gilles Moris <gilles.moris@free.fr>
parents: 7395
diff changeset
182 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (many years ago)</td>
6907
6dcbe191a9b5 Fix up tests
Matt Mackall <mpm@selenic.com>
parents: 6695
diff changeset
183 </tr>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
184 <tr>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
185 <th class="author">parents</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
186 <td class="author"></td>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
187 </tr>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
188 <tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
189 <th class="author">children</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
190 <td class="author"></td>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
191 </tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
192
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
193 </table>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
194
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
195 <div class="overflow">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
196 <table class="bigtable">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
197 <tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
198 <th class="annotate">rev</th>
7395
e2048f5c7bf5 tests: fix tests broken by 03b60f2f90bf
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 7347
diff changeset
199 <th class="line">&nbsp;&nbsp;line source</th>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
200 </tr>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
201
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
202 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
203 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
204 <a href="/annotate/853dcd4de2a6/primes.py#1"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
205 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
206 </td>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
207 <td class="source"><a href="#l1" id="l1"> 1</a> <span class="c">#!/usr/bin/env python</span></td>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
208 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
209 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
210 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
211 <a href="/annotate/853dcd4de2a6/primes.py#2"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
212 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
213 </td>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
214 <td class="source"><a href="#l2" id="l2"> 2</a> </td>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
215 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
216 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
217 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
218 <a href="/annotate/853dcd4de2a6/primes.py#3"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
219 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
220 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
221 <td class="source"><a href="#l3" id="l3"> 3</a> <span class="sd">&quot;&quot;&quot;Fun with generators. Corresponding Haskell implementation:</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
222 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
223 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
224 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
225 <a href="/annotate/853dcd4de2a6/primes.py#4"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
226 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
227 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
228 <td class="source"><a href="#l4" id="l4"> 4</a> </td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
229 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
230 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
231 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
232 <a href="/annotate/853dcd4de2a6/primes.py#5"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
233 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
234 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
235 <td class="source"><a href="#l5" id="l5"> 5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
236 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
237 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
238 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
239 <a href="/annotate/853dcd4de2a6/primes.py#6"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
240 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
241 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
242 <td class="source"><a href="#l6" id="l6"> 6</a> <span class="sd"> where sieve (p:ns) = p : sieve [n | n &lt;- ns, mod n p /= 0]</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
243 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
244 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
245 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
246 <a href="/annotate/853dcd4de2a6/primes.py#7"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
247 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
248 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
249 <td class="source"><a href="#l7" id="l7"> 7</a> <span class="sd">&quot;&quot;&quot;</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
250 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
251 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
252 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
253 <a href="/annotate/853dcd4de2a6/primes.py#8"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
254 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
255 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
256 <td class="source"><a href="#l8" id="l8"> 8</a> </td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
257 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
258 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
259 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
260 <a href="/annotate/853dcd4de2a6/primes.py#9"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
261 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
262 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
263 <td class="source"><a href="#l9" id="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>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
264 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
265 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
266 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
267 <a href="/annotate/853dcd4de2a6/primes.py#10"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
268 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
269 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
270 <td class="source"><a href="#l10" id="l10"> 10</a> </td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
271 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
272 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
273 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
274 <a href="/annotate/853dcd4de2a6/primes.py#11"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
275 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
276 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
277 <td class="source"><a href="#l11" id="l11"> 11</a> <span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
278 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
279 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
280 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
281 <a href="/annotate/853dcd4de2a6/primes.py#12"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
282 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
283 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
284 <td class="source"><a href="#l12" id="l12"> 12</a> <span class="sd">&quot;&quot;&quot;Generate all primes.&quot;&quot;&quot;</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
285 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
286 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
287 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
288 <a href="/annotate/853dcd4de2a6/primes.py#13"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
289 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
290 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
291 <td class="source"><a href="#l13" id="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>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
292 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
293 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
294 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
295 <a href="/annotate/853dcd4de2a6/primes.py#14"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
296 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
297 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
298 <td class="source"><a href="#l14" id="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>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
299 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
300 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
301 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
302 <a href="/annotate/853dcd4de2a6/primes.py#15"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
303 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
304 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
305 <td class="source"><a href="#l15" id="l15"> 15</a> <span class="c"># It is important to yield *here* in order to stop the</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
306 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
307 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
308 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
309 <a href="/annotate/853dcd4de2a6/primes.py#16"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
310 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
311 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
312 <td class="source"><a href="#l16" id="l16"> 16</a> <span class="c"># infinite recursion.</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
313 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
314 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
315 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
316 <a href="/annotate/853dcd4de2a6/primes.py#17"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
317 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
318 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
319 <td class="source"><a href="#l17" id="l17"> 17</a> <span class="kn">yield</span> <span class="n">p</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
320 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
321 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
322 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
323 <a href="/annotate/853dcd4de2a6/primes.py#18"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
324 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
325 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
326 <td class="source"><a href="#l18" id="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>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
327 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
328 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
329 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
330 <a href="/annotate/853dcd4de2a6/primes.py#19"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
331 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
332 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
333 <td class="source"><a href="#l19" id="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>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
334 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
335 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
336 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
337 <a href="/annotate/853dcd4de2a6/primes.py#20"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
338 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
339 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
340 <td class="source"><a href="#l20" id="l20"> 20</a> <span class="kn">yield</span> <span class="n">n</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
341 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
342 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
343 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
344 <a href="/annotate/853dcd4de2a6/primes.py#21"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
345 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
346 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
347 <td class="source"><a href="#l21" id="l21"> 21</a> </td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
348 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
349 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
350 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
351 <a href="/annotate/853dcd4de2a6/primes.py#22"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
352 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
353 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
354 <td class="source"><a href="#l22" id="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>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
355 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
356 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
357 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
358 <a href="/annotate/853dcd4de2a6/primes.py#23"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
359 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
360 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
361 <td class="source"><a href="#l23" id="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>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
362 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
363 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
364 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
365 <a href="/annotate/853dcd4de2a6/primes.py#24"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
366 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
367 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
368 <td class="source"><a href="#l24" id="l24"> 24</a> </td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
369 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
370 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
371 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
372 <a href="/annotate/853dcd4de2a6/primes.py#25"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
373 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
374 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
375 <td class="source"><a href="#l25" id="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>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
376 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
377 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
378 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
379 <a href="/annotate/853dcd4de2a6/primes.py#26"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
380 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
381 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
382 <td class="source"><a href="#l26" id="l26"> 26</a> <span class="kn">import</span> <span class="nn">sys</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
383 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
384 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
385 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
386 <a href="/annotate/853dcd4de2a6/primes.py#27"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
387 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
388 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
389 <td class="source"><a href="#l27" id="l27"> 27</a> <span class="kn">try</span><span class="p">:</span></td>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
390 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
391 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
392 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
393 <a href="/annotate/853dcd4de2a6/primes.py#28"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
394 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
395 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
396 <td class="source"><a href="#l28" id="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>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
397 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
398 <tr class="parity0">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
399 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
400 <a href="/annotate/853dcd4de2a6/primes.py#29"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
401 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
402 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
403 <td class="source"><a href="#l29" id="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>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
404 </tr>
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
405 <tr class="parity1">
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
406 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
407 <a href="/annotate/853dcd4de2a6/primes.py#30"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
408 title="853dcd4de2a6: a">test@0</a>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
409 </td>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
410 <td class="source"><a href="#l30" id="l30"> 30</a> <span class="n">n</span> <span class="o">=</span> <span class="mf">10</span></td>
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
411 </tr>
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
412 <tr class="parity0">
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
413 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
414 <a href="/annotate/853dcd4de2a6/primes.py#31"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
415 title="853dcd4de2a6: a">test@0</a>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
416 </td>
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
417 <td class="source"><a href="#l31" id="l31"> 31</a> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></td>
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
418 </tr>
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
419 <tr class="parity1">
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
420 <td class="annotate">
9426
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
421 <a href="/annotate/853dcd4de2a6/primes.py#32"
b42b03308ae9 test-highlight: remove redundant test
Martin Geisler <mg@lazybytes.net>
parents: 9424
diff changeset
422 title="853dcd4de2a6: a">test@0</a>
8485
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
423 </td>
0b93eff3721d test-highlight: decouple test from get-with-headers.py
Martin Geisler <mg@lazybytes.net>
parents: 8447
diff changeset
424 <td class="source"><a href="#l32" id="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>
8379
10fd7fb65110 highlight: updated changed test output
Martin Geisler <mg@lazybytes.net>
parents: 8353
diff changeset
425 </tr>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
426 </table>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
427 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
428 </div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
429 </div>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
430
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
431
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
432
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
433 </body>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
434 </html>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
435
6987
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
436 % hgweb fileannotate, raw
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
437
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
438 % hgweb filerevision, raw
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
439
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
440 % hgweb highlightcss friendly
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
441 200 Script output follows
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
442
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
443 /* pygments_style = friendly */
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
444
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
445 % errors encountered
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
446 % hg serve again
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
447 % hgweb highlightcss fruity
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
448 200 Script output follows
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
449
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
450 /* pygments_style = fruity */
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
451
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
452 % errors encountered
9424
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
453 adding eucjp.txt
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
454 % HGENCODING=euc-jp hg serve
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
455 % hgweb filerevision, html
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
456 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> \xb5\xfe</div>
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
457 % errors encountered
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
458 % HGENCODING=utf-8 hg serve
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
459 % hgweb filerevision, html
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
460 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> \xef\xbf\xbd\xef\xbf\xbd</div>
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
461 % errors encountered
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
462 % HGENCODING=us-ascii hg serve
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
463 % hgweb filerevision, html
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
464 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> ??</div>
799373ff2554 highlight: fixes garbled text in non-UTF-8 environment
Yuya Nishihara <yuya@tcha.org>
parents: 8936
diff changeset
465 % errors encountered