Show More
@@ -104,6 +104,8 b" annotateline = '" | |||
|
104 | 104 | <div class="annotate-info"> |
|
105 | 105 | <div>{node|short}: {desc|escape|firstline}</div> |
|
106 | 106 | <div>parents: {parents%annotateparent}</div> |
|
107 | <a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> | |
|
108 | <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a> | |
|
107 | 109 | </div> |
|
108 | 110 | </td> |
|
109 | 111 | <td><pre><a class="linenr" href="#{lineid}">{linenumber}</a></pre></td> |
@@ -100,6 +100,8 b" annotateline = '" | |||
|
100 | 100 | <div class="annotate-info"> |
|
101 | 101 | <div>{node|short}: {desc|escape|firstline}</div> |
|
102 | 102 | <div>parents: {parents%annotateparent}</div> |
|
103 | <a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> | |
|
104 | <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a> | |
|
103 | 105 | </div> |
|
104 | 106 | </td> |
|
105 | 107 | <td class="lineno"> |
@@ -85,6 +85,8 b" annotateline = '" | |||
|
85 | 85 | <div class="annotate-info"> |
|
86 | 86 | <div>{node|short}: {desc|escape|firstline}</div> |
|
87 | 87 | <div>parents: {parents%annotateparent}</div> |
|
88 | <a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> | |
|
89 | <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a> | |
|
88 | 90 | </div> |
|
89 | 91 | </td> |
|
90 | 92 | <td class="source"><a href="#{lineid}">{linenumber}</a> {line|escape}</td> |
@@ -63,6 +63,8 b" annotateline = '" | |||
|
63 | 63 | <div class="annotate-info"> |
|
64 | 64 | <div>{node|short}: {desc|escape|firstline}</div> |
|
65 | 65 | <div>parents: {parents%annotateparent}</div> |
|
66 | <a href="{url|urlescape}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">diff</a> | |
|
67 | <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">changeset</a> | |
|
66 | 68 | </div> |
|
67 | 69 | </td> |
|
68 | 70 | <td> |
@@ -191,8 +191,12 b' Set up the repo' | |||
|
191 | 191 | <td class="author"><a href="/file/43c799df6e75/foo?style=paper">43c799df6e75</a> </td> |
|
192 | 192 | <td class="author"><a href="/file/9d8c40cba617/foo?style=paper">9d8c40cba617</a> </td> |
|
193 | 193 | <a href="/annotate/43c799df6e75/foo?style=paper#l1"> |
|
194 | <a href="/diff/43c799df6e75/foo?style=paper">diff</a> | |
|
195 | <a href="/rev/43c799df6e75?style=paper">changeset</a> | |
|
194 | 196 | <a href="/annotate/a7c1559b7bba/foo?style=paper#l2"> |
|
195 | 197 | <a href="/annotate/43c799df6e75/foo?style=paper">0</a></div> |
|
198 | <a href="/diff/a7c1559b7bba/foo?style=paper">diff</a> | |
|
199 | <a href="/rev/a7c1559b7bba?style=paper">changeset</a> | |
|
196 | 200 | |
|
197 | 201 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'diff/xyzzy/foo?style=paper' | egrep $REVLINKS |
|
198 | 202 | <li><a href="/shortlog/xyzzy?style=paper">log</a></li> |
@@ -380,8 +384,12 b' Set up the repo' | |||
|
380 | 384 | <td class="author"><a href="/file/43c799df6e75/foo?style=coal">43c799df6e75</a> </td> |
|
381 | 385 | <td class="author"><a href="/file/9d8c40cba617/foo?style=coal">9d8c40cba617</a> </td> |
|
382 | 386 | <a href="/annotate/43c799df6e75/foo?style=coal#l1"> |
|
387 | <a href="/diff/43c799df6e75/foo?style=coal">diff</a> | |
|
388 | <a href="/rev/43c799df6e75?style=coal">changeset</a> | |
|
383 | 389 | <a href="/annotate/a7c1559b7bba/foo?style=coal#l2"> |
|
384 | 390 | <a href="/annotate/43c799df6e75/foo?style=coal">0</a></div> |
|
391 | <a href="/diff/a7c1559b7bba/foo?style=coal">diff</a> | |
|
392 | <a href="/rev/a7c1559b7bba?style=coal">changeset</a> | |
|
385 | 393 | |
|
386 | 394 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'diff/xyzzy/foo?style=coal' | egrep $REVLINKS |
|
387 | 395 | <li><a href="/shortlog/xyzzy?style=coal">log</a></li> |
@@ -619,8 +627,12 b' Set up the repo' | |||
|
619 | 627 | <a class="list" href="/annotate/43c799df6e75/foo?style=gitweb"> |
|
620 | 628 | <a class="list" href="/annotate/9d8c40cba617/foo?style=gitweb">9d8c40cba617</a></td> |
|
621 | 629 | <a href="/annotate/43c799df6e75/foo?style=gitweb#l1"> |
|
630 | <a href="/diff/43c799df6e75/foo?style=gitweb">diff</a> | |
|
631 | <a href="/rev/43c799df6e75?style=gitweb">changeset</a> | |
|
622 | 632 | <a href="/annotate/a7c1559b7bba/foo?style=gitweb#l2"> |
|
623 | 633 | <a href="/annotate/43c799df6e75/foo?style=gitweb">0</a></div> |
|
634 | <a href="/diff/a7c1559b7bba/foo?style=gitweb">diff</a> | |
|
635 | <a href="/rev/a7c1559b7bba?style=gitweb">changeset</a> | |
|
624 | 636 | |
|
625 | 637 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'diff/xyzzy/foo?style=gitweb' | egrep $REVLINKS |
|
626 | 638 | <a href="/file/xyzzy?style=gitweb">files</a> | |
@@ -836,8 +848,12 b' Set up the repo' | |||
|
836 | 848 | <a href="/annotate/43c799df6e75/foo?style=monoblue"> |
|
837 | 849 | <a href="/annotate/9d8c40cba617/foo?style=monoblue">9d8c40cba617</a> |
|
838 | 850 | <a href="/annotate/43c799df6e75/foo?style=monoblue#l1"> |
|
851 | <a href="/diff/43c799df6e75/foo?style=monoblue">diff</a> | |
|
852 | <a href="/rev/43c799df6e75?style=monoblue">changeset</a> | |
|
839 | 853 | <a href="/annotate/a7c1559b7bba/foo?style=monoblue#l2"> |
|
840 | 854 | <a href="/annotate/43c799df6e75/foo?style=monoblue">0</a></div> |
|
855 | <a href="/diff/a7c1559b7bba/foo?style=monoblue">diff</a> | |
|
856 | <a href="/rev/a7c1559b7bba?style=monoblue">changeset</a> | |
|
841 | 857 | |
|
842 | 858 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'diff/xyzzy/foo?style=monoblue' | egrep $REVLINKS |
|
843 | 859 | <li><a href="/graph/xyzzy?style=monoblue">graph</a></li> |
@@ -1034,8 +1050,12 b' Set up the repo' | |||
|
1034 | 1050 | <a href="/annotate/43c799df6e75/foo?style=spartan"> |
|
1035 | 1051 | <td><a href="/annotate/9d8c40cba617/foo?style=spartan">9d8c40cba617</a></td> |
|
1036 | 1052 | <a href="/annotate/43c799df6e75/foo?style=spartan#l1"> |
|
1053 | <a href="/diff/43c799df6e75/foo?style=spartan">diff</a> | |
|
1054 | <a href="/rev/43c799df6e75?style=spartan">changeset</a> | |
|
1037 | 1055 | <a href="/annotate/a7c1559b7bba/foo?style=spartan#l2"> |
|
1038 | 1056 | <a href="/annotate/43c799df6e75/foo?style=spartan">0</a></div> |
|
1057 | <a href="/diff/a7c1559b7bba/foo?style=spartan">diff</a> | |
|
1058 | <a href="/rev/a7c1559b7bba?style=spartan">changeset</a> | |
|
1039 | 1059 | |
|
1040 | 1060 | $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'diff/xyzzy/foo?style=spartan' | egrep $REVLINKS |
|
1041 | 1061 | <a href="/log/xyzzy?style=spartan">changelog</a> |
@@ -296,6 +296,8 b' hgweb fileannotate, html' | |||
|
296 | 296 | <div class="annotate-info"> |
|
297 | 297 | <div>06824edf55d0: a</div> |
|
298 | 298 | <div>parents: </div> |
|
299 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
300 | <a href="/rev/06824edf55d0">changeset</a> | |
|
299 | 301 | </div> |
|
300 | 302 | </td> |
|
301 | 303 | <td class="source"><a href="#l1"> 1</a> <span class="c">#!/usr/bin/env python</span></td> |
@@ -306,6 +308,8 b' hgweb fileannotate, html' | |||
|
306 | 308 | <div class="annotate-info"> |
|
307 | 309 | <div>06824edf55d0: a</div> |
|
308 | 310 | <div>parents: </div> |
|
311 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
312 | <a href="/rev/06824edf55d0">changeset</a> | |
|
309 | 313 | </div> |
|
310 | 314 | </td> |
|
311 | 315 | <td class="source"><a href="#l2"> 2</a> </td> |
@@ -316,6 +320,8 b' hgweb fileannotate, html' | |||
|
316 | 320 | <div class="annotate-info"> |
|
317 | 321 | <div>06824edf55d0: a</div> |
|
318 | 322 | <div>parents: </div> |
|
323 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
324 | <a href="/rev/06824edf55d0">changeset</a> | |
|
319 | 325 | </div> |
|
320 | 326 | </td> |
|
321 | 327 | <td class="source"><a href="#l3"> 3</a> <span class="sd">"""Fun with generators. Corresponding Haskell implementation:</span></td> |
@@ -326,6 +332,8 b' hgweb fileannotate, html' | |||
|
326 | 332 | <div class="annotate-info"> |
|
327 | 333 | <div>06824edf55d0: a</div> |
|
328 | 334 | <div>parents: </div> |
|
335 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
336 | <a href="/rev/06824edf55d0">changeset</a> | |
|
329 | 337 | </div> |
|
330 | 338 | </td> |
|
331 | 339 | <td class="source"><a href="#l4"> 4</a> </td> |
@@ -336,6 +344,8 b' hgweb fileannotate, html' | |||
|
336 | 344 | <div class="annotate-info"> |
|
337 | 345 | <div>06824edf55d0: a</div> |
|
338 | 346 | <div>parents: </div> |
|
347 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
348 | <a href="/rev/06824edf55d0">changeset</a> | |
|
339 | 349 | </div> |
|
340 | 350 | </td> |
|
341 | 351 | <td class="source"><a href="#l5"> 5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></td> |
@@ -346,6 +356,8 b' hgweb fileannotate, html' | |||
|
346 | 356 | <div class="annotate-info"> |
|
347 | 357 | <div>06824edf55d0: a</div> |
|
348 | 358 | <div>parents: </div> |
|
359 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
360 | <a href="/rev/06824edf55d0">changeset</a> | |
|
349 | 361 | </div> |
|
350 | 362 | </td> |
|
351 | 363 | <td class="source"><a href="#l6"> 6</a> <span class="sd"> where sieve (p:ns) = p : sieve [n | n <- ns, mod n p /= 0]</span></td> |
@@ -356,6 +368,8 b' hgweb fileannotate, html' | |||
|
356 | 368 | <div class="annotate-info"> |
|
357 | 369 | <div>06824edf55d0: a</div> |
|
358 | 370 | <div>parents: </div> |
|
371 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
372 | <a href="/rev/06824edf55d0">changeset</a> | |
|
359 | 373 | </div> |
|
360 | 374 | </td> |
|
361 | 375 | <td class="source"><a href="#l7"> 7</a> <span class="sd">"""</span></td> |
@@ -366,6 +380,8 b' hgweb fileannotate, html' | |||
|
366 | 380 | <div class="annotate-info"> |
|
367 | 381 | <div>06824edf55d0: a</div> |
|
368 | 382 | <div>parents: </div> |
|
383 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
384 | <a href="/rev/06824edf55d0">changeset</a> | |
|
369 | 385 | </div> |
|
370 | 386 | </td> |
|
371 | 387 | <td class="source"><a href="#l8"> 8</a> </td> |
@@ -376,6 +392,8 b' hgweb fileannotate, html' | |||
|
376 | 392 | <div class="annotate-info"> |
|
377 | 393 | <div>06824edf55d0: a</div> |
|
378 | 394 | <div>parents: </div> |
|
395 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
396 | <a href="/rev/06824edf55d0">changeset</a> | |
|
379 | 397 | </div> |
|
380 | 398 | </td> |
|
381 | 399 | <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> |
@@ -386,6 +404,8 b' hgweb fileannotate, html' | |||
|
386 | 404 | <div class="annotate-info"> |
|
387 | 405 | <div>06824edf55d0: a</div> |
|
388 | 406 | <div>parents: </div> |
|
407 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
408 | <a href="/rev/06824edf55d0">changeset</a> | |
|
389 | 409 | </div> |
|
390 | 410 | </td> |
|
391 | 411 | <td class="source"><a href="#l10"> 10</a> </td> |
@@ -396,6 +416,8 b' hgweb fileannotate, html' | |||
|
396 | 416 | <div class="annotate-info"> |
|
397 | 417 | <div>06824edf55d0: a</div> |
|
398 | 418 | <div>parents: </div> |
|
419 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
420 | <a href="/rev/06824edf55d0">changeset</a> | |
|
399 | 421 | </div> |
|
400 | 422 | </td> |
|
401 | 423 | <td class="source"><a href="#l11"> 11</a> <span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></td> |
@@ -406,6 +428,8 b' hgweb fileannotate, html' | |||
|
406 | 428 | <div class="annotate-info"> |
|
407 | 429 | <div>06824edf55d0: a</div> |
|
408 | 430 | <div>parents: </div> |
|
431 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
432 | <a href="/rev/06824edf55d0">changeset</a> | |
|
409 | 433 | </div> |
|
410 | 434 | </td> |
|
411 | 435 | <td class="source"><a href="#l12"> 12</a> <span class="sd">"""Generate all primes."""</span></td> |
@@ -416,6 +440,8 b' hgweb fileannotate, html' | |||
|
416 | 440 | <div class="annotate-info"> |
|
417 | 441 | <div>06824edf55d0: a</div> |
|
418 | 442 | <div>parents: </div> |
|
443 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
444 | <a href="/rev/06824edf55d0">changeset</a> | |
|
419 | 445 | </div> |
|
420 | 446 | </td> |
|
421 | 447 | <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> |
@@ -426,6 +452,8 b' hgweb fileannotate, html' | |||
|
426 | 452 | <div class="annotate-info"> |
|
427 | 453 | <div>06824edf55d0: a</div> |
|
428 | 454 | <div>parents: </div> |
|
455 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
456 | <a href="/rev/06824edf55d0">changeset</a> | |
|
429 | 457 | </div> |
|
430 | 458 | </td> |
|
431 | 459 | <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> |
@@ -436,6 +464,8 b' hgweb fileannotate, html' | |||
|
436 | 464 | <div class="annotate-info"> |
|
437 | 465 | <div>06824edf55d0: a</div> |
|
438 | 466 | <div>parents: </div> |
|
467 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
468 | <a href="/rev/06824edf55d0">changeset</a> | |
|
439 | 469 | </div> |
|
440 | 470 | </td> |
|
441 | 471 | <td class="source"><a href="#l15"> 15</a> <span class="c"># It is important to yield *here* in order to stop the</span></td> |
@@ -446,6 +476,8 b' hgweb fileannotate, html' | |||
|
446 | 476 | <div class="annotate-info"> |
|
447 | 477 | <div>06824edf55d0: a</div> |
|
448 | 478 | <div>parents: </div> |
|
479 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
480 | <a href="/rev/06824edf55d0">changeset</a> | |
|
449 | 481 | </div> |
|
450 | 482 | </td> |
|
451 | 483 | <td class="source"><a href="#l16"> 16</a> <span class="c"># infinite recursion.</span></td> |
@@ -456,6 +488,8 b' hgweb fileannotate, html' | |||
|
456 | 488 | <div class="annotate-info"> |
|
457 | 489 | <div>06824edf55d0: a</div> |
|
458 | 490 | <div>parents: </div> |
|
491 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
492 | <a href="/rev/06824edf55d0">changeset</a> | |
|
459 | 493 | </div> |
|
460 | 494 | </td> |
|
461 | 495 | <td class="source"><a href="#l17"> 17</a> <span class="kn">yield</span> <span class="n">p</span></td> |
@@ -466,6 +500,8 b' hgweb fileannotate, html' | |||
|
466 | 500 | <div class="annotate-info"> |
|
467 | 501 | <div>06824edf55d0: a</div> |
|
468 | 502 | <div>parents: </div> |
|
503 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
504 | <a href="/rev/06824edf55d0">changeset</a> | |
|
469 | 505 | </div> |
|
470 | 506 | </td> |
|
471 | 507 | <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="mi">0</span><span class="p">,</span> <span class="n">ns</span><span class="p">)</span></td> |
@@ -476,6 +512,8 b' hgweb fileannotate, html' | |||
|
476 | 512 | <div class="annotate-info"> |
|
477 | 513 | <div>06824edf55d0: a</div> |
|
478 | 514 | <div>parents: </div> |
|
515 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
516 | <a href="/rev/06824edf55d0">changeset</a> | |
|
479 | 517 | </div> |
|
480 | 518 | </td> |
|
481 | 519 | <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> |
@@ -486,6 +524,8 b' hgweb fileannotate, html' | |||
|
486 | 524 | <div class="annotate-info"> |
|
487 | 525 | <div>06824edf55d0: a</div> |
|
488 | 526 | <div>parents: </div> |
|
527 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
528 | <a href="/rev/06824edf55d0">changeset</a> | |
|
489 | 529 | </div> |
|
490 | 530 | </td> |
|
491 | 531 | <td class="source"><a href="#l20"> 20</a> <span class="kn">yield</span> <span class="n">n</span></td> |
@@ -496,6 +536,8 b' hgweb fileannotate, html' | |||
|
496 | 536 | <div class="annotate-info"> |
|
497 | 537 | <div>06824edf55d0: a</div> |
|
498 | 538 | <div>parents: </div> |
|
539 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
540 | <a href="/rev/06824edf55d0">changeset</a> | |
|
499 | 541 | </div> |
|
500 | 542 | </td> |
|
501 | 543 | <td class="source"><a href="#l21"> 21</a> </td> |
@@ -506,6 +548,8 b' hgweb fileannotate, html' | |||
|
506 | 548 | <div class="annotate-info"> |
|
507 | 549 | <div>06824edf55d0: a</div> |
|
508 | 550 | <div>parents: </div> |
|
551 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
552 | <a href="/rev/06824edf55d0">changeset</a> | |
|
509 | 553 | </div> |
|
510 | 554 | </td> |
|
511 | 555 | <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="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></td> |
@@ -516,6 +560,8 b' hgweb fileannotate, html' | |||
|
516 | 560 | <div class="annotate-info"> |
|
517 | 561 | <div>06824edf55d0: a</div> |
|
518 | 562 | <div>parents: </div> |
|
563 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
564 | <a href="/rev/06824edf55d0">changeset</a> | |
|
519 | 565 | </div> |
|
520 | 566 | </td> |
|
521 | 567 | <td class="source"><a href="#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"><</span> <span class="mi">3</span><span class="p">,</span> <span class="n">odds</span><span class="p">)))</span></td> |
@@ -526,6 +572,8 b' hgweb fileannotate, html' | |||
|
526 | 572 | <div class="annotate-info"> |
|
527 | 573 | <div>06824edf55d0: a</div> |
|
528 | 574 | <div>parents: </div> |
|
575 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
576 | <a href="/rev/06824edf55d0">changeset</a> | |
|
529 | 577 | </div> |
|
530 | 578 | </td> |
|
531 | 579 | <td class="source"><a href="#l24"> 24</a> </td> |
@@ -536,6 +584,8 b' hgweb fileannotate, html' | |||
|
536 | 584 | <div class="annotate-info"> |
|
537 | 585 | <div>06824edf55d0: a</div> |
|
538 | 586 | <div>parents: </div> |
|
587 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
588 | <a href="/rev/06824edf55d0">changeset</a> | |
|
539 | 589 | </div> |
|
540 | 590 | </td> |
|
541 | 591 | <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">"__main__"</span><span class="p">:</span></td> |
@@ -546,6 +596,8 b' hgweb fileannotate, html' | |||
|
546 | 596 | <div class="annotate-info"> |
|
547 | 597 | <div>06824edf55d0: a</div> |
|
548 | 598 | <div>parents: </div> |
|
599 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
600 | <a href="/rev/06824edf55d0">changeset</a> | |
|
549 | 601 | </div> |
|
550 | 602 | </td> |
|
551 | 603 | <td class="source"><a href="#l26"> 26</a> <span class="kn">import</span> <span class="nn">sys</span></td> |
@@ -556,6 +608,8 b' hgweb fileannotate, html' | |||
|
556 | 608 | <div class="annotate-info"> |
|
557 | 609 | <div>06824edf55d0: a</div> |
|
558 | 610 | <div>parents: </div> |
|
611 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
612 | <a href="/rev/06824edf55d0">changeset</a> | |
|
559 | 613 | </div> |
|
560 | 614 | </td> |
|
561 | 615 | <td class="source"><a href="#l27"> 27</a> <span class="kn">try</span><span class="p">:</span></td> |
@@ -566,6 +620,8 b' hgweb fileannotate, html' | |||
|
566 | 620 | <div class="annotate-info"> |
|
567 | 621 | <div>06824edf55d0: a</div> |
|
568 | 622 | <div>parents: </div> |
|
623 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
624 | <a href="/rev/06824edf55d0">changeset</a> | |
|
569 | 625 | </div> |
|
570 | 626 | </td> |
|
571 | 627 | <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="mi">1</span><span class="p">])</span></td> |
@@ -576,6 +632,8 b' hgweb fileannotate, html' | |||
|
576 | 632 | <div class="annotate-info"> |
|
577 | 633 | <div>06824edf55d0: a</div> |
|
578 | 634 | <div>parents: </div> |
|
635 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
636 | <a href="/rev/06824edf55d0">changeset</a> | |
|
579 | 637 | </div> |
|
580 | 638 | </td> |
|
581 | 639 | <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> |
@@ -586,6 +644,8 b' hgweb fileannotate, html' | |||
|
586 | 644 | <div class="annotate-info"> |
|
587 | 645 | <div>06824edf55d0: a</div> |
|
588 | 646 | <div>parents: </div> |
|
647 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
648 | <a href="/rev/06824edf55d0">changeset</a> | |
|
589 | 649 | </div> |
|
590 | 650 | </td> |
|
591 | 651 | <td class="source"><a href="#l30"> 30</a> <span class="n">n</span> <span class="o">=</span> <span class="mi">10</span></td> |
@@ -596,6 +656,8 b' hgweb fileannotate, html' | |||
|
596 | 656 | <div class="annotate-info"> |
|
597 | 657 | <div>06824edf55d0: a</div> |
|
598 | 658 | <div>parents: </div> |
|
659 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
660 | <a href="/rev/06824edf55d0">changeset</a> | |
|
599 | 661 | </div> |
|
600 | 662 | </td> |
|
601 | 663 | <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> |
@@ -606,6 +668,8 b' hgweb fileannotate, html' | |||
|
606 | 668 | <div class="annotate-info"> |
|
607 | 669 | <div>06824edf55d0: a</div> |
|
608 | 670 | <div>parents: </div> |
|
671 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
672 | <a href="/rev/06824edf55d0">changeset</a> | |
|
609 | 673 | </div> |
|
610 | 674 | </td> |
|
611 | 675 | <td class="source"><a href="#l32"> 32</a> <span class="kn">print</span> <span class="s">"The first </span><span class="si">%d</span><span class="s"> primes: </span><span class="si">%s</span><span class="s">"</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> |
@@ -616,6 +680,8 b' hgweb fileannotate, html' | |||
|
616 | 680 | <div class="annotate-info"> |
|
617 | 681 | <div>06824edf55d0: a</div> |
|
618 | 682 | <div>parents: </div> |
|
683 | <a href="/diff/06824edf55d0/primes.py">diff</a> | |
|
684 | <a href="/rev/06824edf55d0">changeset</a> | |
|
619 | 685 | </div> |
|
620 | 686 | </td> |
|
621 | 687 | <td class="source"><a href="#l33"> 33</a> </td> |
General Comments 0
You need to be logged in to leave comments.
Login now