Show More
@@ -693,6 +693,22 b' def pygments211():' | |||||
693 | return (major, minor) >= (2, 11) |
|
693 | return (major, minor) >= (2, 11) | |
694 |
|
694 | |||
695 |
|
695 | |||
|
696 | @check("pygments214", "Pygments version >= 2.14") | |||
|
697 | def pygments214(): | |||
|
698 | try: | |||
|
699 | import pygments | |||
|
700 | ||||
|
701 | v = pygments.__version__ | |||
|
702 | except ImportError: | |||
|
703 | return False | |||
|
704 | ||||
|
705 | parts = v.split(".") | |||
|
706 | major = int(parts[0]) | |||
|
707 | minor = int(parts[1]) | |||
|
708 | ||||
|
709 | return (major, minor) >= (2, 14) | |||
|
710 | ||||
|
711 | ||||
696 | @check("outer-repo", "outer repo") |
|
712 | @check("outer-repo", "outer repo") | |
697 | def has_outer_repo(): |
|
713 | def has_outer_repo(): | |
698 | # failing for other reasons than 'no repo' imply that there is a repo |
|
714 | # failing for other reasons than 'no repo' imply that there is a repo |
@@ -163,7 +163,8 b' hgweb filerevision, html' | |||||
163 | <span id="l7"><span class="kn">import</span> <span class="nn">itertools</span></span><a href="#l7"></a> |
|
163 | <span id="l7"><span class="kn">import</span> <span class="nn">itertools</span></span><a href="#l7"></a> | |
164 | <span id="l8"></span><a href="#l8"></a> |
|
164 | <span id="l8"></span><a href="#l8"></a> | |
165 | <span id="l9"><span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></span><a href="#l9"></a> |
|
165 | <span id="l9"><span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></span><a href="#l9"></a> | |
166 | <span id="l10"> <span class="sd">"""Generate all primes."""</span></span><a href="#l10"></a> |
|
166 | <span id="l10"><span class="w"> </span><span class="sd">"""Generate all primes."""</span></span><a href="#l10"></a> (pygments214 !) | |
|
167 | <span id="l10"> <span class="sd">"""Generate all primes."""</span></span><a href="#l10"></a> (no-pygments214 !) | |||
167 | <span id="l11"> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></span><a href="#l11"></a> |
|
168 | <span id="l11"> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></span><a href="#l11"></a> | |
168 | <span id="l12"> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></span><a href="#l12"></a> |
|
169 | <span id="l12"> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></span><a href="#l12"></a> | |
169 | <span id="l13"> <span class="c"># It is important to yield *here* in order to stop the</span></span><a href="#l13"></a> |
|
170 | <span id="l13"> <span class="c"># It is important to yield *here* in order to stop the</span></span><a href="#l13"></a> | |
@@ -489,7 +490,8 b' hgweb fileannotate, html' | |||||
489 | <a href="/rev/687f2d169546">changeset</a> |
|
490 | <a href="/rev/687f2d169546">changeset</a> | |
490 | </div> |
|
491 | </div> | |
491 | </td> |
|
492 | </td> | |
492 |
<td class="source followlines-btn-parent"><a href="#l10"> 10</a> <span class="sd">""" |
|
493 | <td class="source followlines-btn-parent"><a href="#l10"> 10</a> <span class="w"> </span><span class="sd">"""Generate all primes."""</span></td> (pygments214 !) | |
|
494 | <td class="source followlines-btn-parent"><a href="#l10"> 10</a> <span class="sd">"""Generate all primes."""</span></td> (no-pygments214 !) | |||
493 | </tr> |
|
495 | </tr> | |
494 | <tr id="l11" class="thisrev"> |
|
496 | <tr id="l11" class="thisrev"> | |
495 | <td class="annotate parity0"> |
|
497 | <td class="annotate parity0"> |
General Comments 0
You need to be logged in to leave comments.
Login now