Patchwork [5,of,5] tests: modify tests according to changes in last hgweb commits

login
register
mail settings
Submitter Alexander Plavin
Date May 31, 2013, 10:35 a.m.
Message ID <865603233275da64054f.1369996512@debian-alexander.dolgopa>
Download mbox | patch
Permalink /patch/1678/
State Rejected, archived
Headers show

Comments

Alexander Plavin - May 31, 2013, 10:35 a.m.
# HG changeset patch
# User Alexander Plavin <me@aplavin.ru>
# Date 1369995940 -14400
#      Fri May 31 14:25:40 2013 +0400
# Node ID 865603233275da64054fee10a05c24c5f467850e
# Parent  4f160aa9504aa6a902eb3832d28d38b0f7ba3ee2
tests: modify tests according to changes in last hgweb commits

This is a separate commit to modify the tests only once and not to
clutter diffs.

Patch

diff -r 4f160aa9504a -r 865603233275 tests/test-help.t
--- a/tests/test-help.t	Fri May 31 13:17:59 2013 +0400
+++ b/tests/test-help.t	Fri May 31 14:25:40 2013 +0400
@@ -1456,7 +1456,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -1622,7 +1626,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -1818,7 +1826,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -1913,7 +1925,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
diff -r 4f160aa9504a -r 865603233275 tests/test-hgweb-commands.t
--- a/tests/test-hgweb-commands.t	Fri May 31 13:17:59 2013 +0400
+++ b/tests/test-hgweb-commands.t	Fri May 31 14:25:40 2013 +0400
@@ -338,7 +338,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -450,22 +454,26 @@ 
   </table>
   
   <div class="overflow">
-  <div class="sourcefirst">   line diff</div>
+  <div class="sourcefirst"></div>
   
-  <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1">     1.1</a> <span class="minusline">--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l1.2" id="l1.2">     1.2</a> <span class="plusline">+++ b/da/foo	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l1.3" id="l1.3">     1.3</a> <span class="atline">@@ -0,0 +1,1 @@
-  </span><a href="#l1.4" id="l1.4">     1.4</a> <span class="plusline">+foo
-  </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1">     2.1</a> <span class="minusline">--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l2.2" id="l2.2">     2.2</a> <span class="plusline">+++ b/foo	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l2.3" id="l2.3">     2.3</a> <span class="atline">@@ -0,0 +1,1 @@
-  </span><a href="#l2.4" id="l2.4">     2.4</a> <span class="plusline">+foo
-  </span></pre></div>
+  <div class="bottomline parity0"><ol class="parity0"><li class="source" id="l1.1"><div class="minusline">--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l1.2"><div class="plusline">+++ b/da/foo	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l1.3"><div class="atline">@@ -0,0 +1,1 @@
+  </div></li><li class="source" id="l1.4"><div class="plusline">+foo
+  </div></li></ol></div><div class="bottomline parity1"><ol class="parity1"><li class="source" id="l2.1"><div class="minusline">--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l2.2"><div class="plusline">+++ b/foo	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l2.3"><div class="atline">@@ -0,0 +1,1 @@
+  </div></li><li class="source" id="l2.4"><div class="plusline">+foo
+  </div></li></ol></div>
   </div>
   
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -557,7 +565,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -667,16 +679,22 @@ 
   </table>
   
   <div class="overflow">
-  <div class="sourcefirst"> line source</div>
+  <div class="sourcefirst"></div>
+  <ol>
   
-  <div class="parity0 source"><a href="#l1" id="l1">     1</a> foo
-  </div>
+  <li class="parity0 source" id="l1"><div>foo
+  </div></li>
+  </ol>
   <div class="sourcelast"></div>
   </div>
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
diff -r 4f160aa9504a -r 865603233275 tests/test-hgweb-descend-empties.t
--- a/tests/test-hgweb-descend-empties.t	Fri May 31 13:17:59 2013 +0400
+++ b/tests/test-hgweb-descend-empties.t	Fri May 31 14:25:40 2013 +0400
@@ -132,7 +132,11 @@ 
   </table>
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
diff -r 4f160aa9504a -r 865603233275 tests/test-hgweb-diffs.t
--- a/tests/test-hgweb-diffs.t	Fri May 31 13:17:59 2013 +0400
+++ b/tests/test-hgweb-diffs.t	Fri May 31 14:25:40 2013 +0400
@@ -142,22 +142,26 @@ 
   </table>
   
   <div class="overflow">
-  <div class="sourcefirst">   line diff</div>
+  <div class="sourcefirst"></div>
   
-  <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1">     1.1</a> <span class="minusline">--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l1.2" id="l1.2">     1.2</a> <span class="plusline">+++ b/a	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l1.3" id="l1.3">     1.3</a> <span class="atline">@@ -0,0 +1,1 @@
-  </span><a href="#l1.4" id="l1.4">     1.4</a> <span class="plusline">+a
-  </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1">     2.1</a> <span class="minusline">--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l2.2" id="l2.2">     2.2</a> <span class="plusline">+++ b/b	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l2.3" id="l2.3">     2.3</a> <span class="atline">@@ -0,0 +1,1 @@
-  </span><a href="#l2.4" id="l2.4">     2.4</a> <span class="plusline">+b
-  </span></pre></div>
+  <div class="bottomline parity0"><ol class="parity0"><li class="source" id="l1.1"><div class="minusline">--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l1.2"><div class="plusline">+++ b/a	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l1.3"><div class="atline">@@ -0,0 +1,1 @@
+  </div></li><li class="source" id="l1.4"><div class="plusline">+a
+  </div></li></ol></div><div class="bottomline parity1"><ol class="parity1"><li class="source" id="l2.1"><div class="minusline">--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l2.2"><div class="plusline">+++ b/b	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l2.3"><div class="atline">@@ -0,0 +1,1 @@
+  </div></li><li class="source" id="l2.4"><div class="plusline">+b
+  </div></li></ol></div>
   </div>
   
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -271,18 +275,22 @@ 
   </table>
   
   <div class="overflow">
-  <div class="sourcefirst">   line diff</div>
+  <div class="sourcefirst"></div>
   
-  <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1">     1.1</a> <span class="minusline">--- a/b	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l1.2" id="l1.2">     1.2</a> <span class="plusline">+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l1.3" id="l1.3">     1.3</a> <span class="atline">@@ -1,1 +0,0 @@
-  </span><a href="#l1.4" id="l1.4">     1.4</a> <span class="minusline">-b
-  </span></pre></div>
+  <div class="bottomline parity0"><ol class="parity0"><li class="source" id="l1.1"><div class="minusline">--- a/b	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l1.2"><div class="plusline">+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l1.3"><div class="atline">@@ -1,1 +0,0 @@
+  </div></li><li class="source" id="l1.4"><div class="minusline">-b
+  </div></li></ol></div>
   </div>
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -403,24 +411,28 @@ 
   </table>
   
   <div class="overflow">
-  <div class="sourcefirst">   line diff</div>
+  <div class="sourcefirst"></div>
   
-  <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1">     1.1</a> new file mode 100644
-  <a href="#l1.2" id="l1.2">     1.2</a> <span class="minusline">--- /dev/null
-  </span><a href="#l1.3" id="l1.3">     1.3</a> <span class="plusline">+++ b/a
-  </span><a href="#l1.4" id="l1.4">     1.4</a> <span class="atline">@@ -0,0 +1,1 @@
-  </span><a href="#l1.5" id="l1.5">     1.5</a> <span class="plusline">+a
-  </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1">     2.1</a> new file mode 100644
-  <a href="#l2.2" id="l2.2">     2.2</a> <span class="minusline">--- /dev/null
-  </span><a href="#l2.3" id="l2.3">     2.3</a> <span class="plusline">+++ b/b
-  </span><a href="#l2.4" id="l2.4">     2.4</a> <span class="atline">@@ -0,0 +1,1 @@
-  </span><a href="#l2.5" id="l2.5">     2.5</a> <span class="plusline">+b
-  </span></pre></div>
+  <div class="bottomline parity0"><ol class="parity0"><li class="source" id="l1.1"><div>new file mode 100644
+  </div></li><li class="source" id="l1.2"><div class="minusline">--- /dev/null
+  </div></li><li class="source" id="l1.3"><div class="plusline">+++ b/a
+  </div></li><li class="source" id="l1.4"><div class="atline">@@ -0,0 +1,1 @@
+  </div></li><li class="source" id="l1.5"><div class="plusline">+a
+  </div></li></ol></div><div class="bottomline parity1"><ol class="parity1"><li class="source" id="l2.1"><div>new file mode 100644
+  </div></li><li class="source" id="l2.2"><div class="minusline">--- /dev/null
+  </div></li><li class="source" id="l2.3"><div class="plusline">+++ b/b
+  </div></li><li class="source" id="l2.4"><div class="atline">@@ -0,0 +1,1 @@
+  </div></li><li class="source" id="l2.5"><div class="plusline">+b
+  </div></li></ol></div>
   </div>
   
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -536,16 +548,20 @@ 
   </table>
   
   <div class="overflow">
-  <div class="sourcefirst">   line diff</div>
+  <div class="sourcefirst"></div>
   
-  <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1">     1.1</a> old mode 100644
-  <a href="#l1.2" id="l1.2">     1.2</a> new mode 100755
-  </pre></div>
+  <div class="bottomline parity0"><ol class="parity0"><li class="source" id="l1.1"><div>old mode 100644
+  </div></li><li class="source" id="l1.2"><div>new mode 100755
+  </div></li></ol></div>
   </div>
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -663,7 +679,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -789,7 +809,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -913,7 +937,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
diff -r 4f160aa9504a -r 865603233275 tests/test-hgweb-empty.t
--- a/tests/test-hgweb-empty.t	Fri May 31 13:17:59 2013 +0400
+++ b/tests/test-hgweb-empty.t	Fri May 31 14:25:40 2013 +0400
@@ -91,7 +91,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -184,7 +188,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -328,7 +336,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -401,7 +413,11 @@ 
   </table>
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
diff -r 4f160aa9504a -r 865603233275 tests/test-hgweb-filelog.t
--- a/tests/test-hgweb-filelog.t	Fri May 31 13:17:59 2013 +0400
+++ b/tests/test-hgweb-filelog.t	Fri May 31 14:25:40 2013 +0400
@@ -207,7 +207,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -314,7 +318,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -416,7 +424,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -518,7 +530,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -583,7 +599,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
diff -r 4f160aa9504a -r 865603233275 tests/test-hgweb-removed.t
--- a/tests/test-hgweb-removed.t	Fri May 31 13:17:59 2013 +0400
+++ b/tests/test-hgweb-removed.t	Fri May 31 14:25:40 2013 +0400
@@ -115,18 +115,22 @@ 
   </table>
   
   <div class="overflow">
-  <div class="sourcefirst">   line diff</div>
+  <div class="sourcefirst"></div>
   
-  <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1">     1.1</a> <span class="minusline">--- a/a	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l1.2" id="l1.2">     1.2</a> <span class="plusline">+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l1.3" id="l1.3">     1.3</a> <span class="atline">@@ -1,1 +0,0 @@
-  </span><a href="#l1.4" id="l1.4">     1.4</a> <span class="minusline">-a
-  </span></pre></div>
+  <div class="bottomline parity0"><ol class="parity0"><li class="source" id="l1.1"><div class="minusline">--- a/a	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l1.2"><div class="plusline">+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l1.3"><div class="atline">@@ -1,1 +0,0 @@
+  </div></li><li class="source" id="l1.4"><div class="minusline">-a
+  </div></li></ol></div>
   </div>
   
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -215,18 +219,22 @@ 
   </table>
   
   <div class="overflow">
-  <div class="sourcefirst">   line diff</div>
+  <div class="sourcefirst"></div>
   
-  <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1">     1.1</a> <span class="minusline">--- a/a	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l1.2" id="l1.2">     1.2</a> <span class="plusline">+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
-  </span><a href="#l1.3" id="l1.3">     1.3</a> <span class="atline">@@ -1,1 +0,0 @@
-  </span><a href="#l1.4" id="l1.4">     1.4</a> <span class="minusline">-a
-  </span></pre></div>
+  <div class="bottomline parity0"><ol class="parity0"><li class="source" id="l1.1"><div class="minusline">--- a/a	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l1.2"><div class="plusline">+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  </div></li><li class="source" id="l1.3"><div class="atline">@@ -1,1 +0,0 @@
+  </div></li><li class="source" id="l1.4"><div class="minusline">-a
+  </div></li></ol></div>
   </div>
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
diff -r 4f160aa9504a -r 865603233275 tests/test-hgweb.t
--- a/tests/test-hgweb.t	Fri May 31 13:17:59 2013 +0400
+++ b/tests/test-hgweb.t	Fri May 31 14:25:40 2013 +0400
@@ -96,7 +96,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -186,7 +190,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -290,7 +298,11 @@ 
   </table>
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
diff -r 4f160aa9504a -r 865603233275 tests/test-hgwebdir.t
--- a/tests/test-hgwebdir.t	Fri May 31 13:17:59 2013 +0400
+++ b/tests/test-hgwebdir.t	Fri May 31 14:25:40 2013 +0400
@@ -655,7 +655,11 @@ 
   </table>
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -722,7 +726,11 @@ 
   </table>
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -1082,7 +1090,11 @@ 
   </table>
   </div>
   </div>
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
diff -r 4f160aa9504a -r 865603233275 tests/test-highlight.t
--- a/tests/test-highlight.t	Fri May 31 13:17:59 2013 +0400
+++ b/tests/test-highlight.t	Fri May 31 14:25:40 2013 +0400
@@ -136,46 +136,52 @@ 
   </table>
   
   <div class="overflow">
-  <div class="sourcefirst"> line source</div>
+  <div class="sourcefirst"></div>
+  <ol>
   
-  <div class="parity0 source"><a href="#l1" id="l1">     1</a> <span class="c">#!/usr/bin/env python</span></div>
-  <div class="parity1 source"><a href="#l2" id="l2">     2</a> </div>
-  <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>
-  <div class="parity1 source"><a href="#l4" id="l4">     4</a> </div>
-  <div class="parity0 source"><a href="#l5" id="l5">     5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></div>
-  <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>
-  <div class="parity0 source"><a href="#l7" id="l7">     7</a> <span class="sd">&quot;&quot;&quot;</span></div>
-  <div class="parity1 source"><a href="#l8" id="l8">     8</a> </div>
-  <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>
-  <div class="parity1 source"><a href="#l10" id="l10">    10</a> </div>
-  <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>
-  <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>
-  <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>
-  <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>
-  <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>
-  <div class="parity1 source"><a href="#l16" id="l16">    16</a>         <span class="c"># infinite recursion.</span></div>
-  <div class="parity0 source"><a href="#l17" id="l17">    17</a>         <span class="kn">yield</span> <span class="n">p</span></div>
-  <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>
-  <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>
-  <div class="parity1 source"><a href="#l20" id="l20">    20</a>             <span class="kn">yield</span> <span class="n">n</span></div>
-  <div class="parity0 source"><a href="#l21" id="l21">    21</a> </div>
-  <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>
-  <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>
-  <div class="parity1 source"><a href="#l24" id="l24">    24</a> </div>
-  <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>
-  <div class="parity1 source"><a href="#l26" id="l26">    26</a>     <span class="kn">import</span> <span class="nn">sys</span></div>
-  <div class="parity0 source"><a href="#l27" id="l27">    27</a>     <span class="kn">try</span><span class="p">:</span></div>
-  <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>
-  <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>
-  <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>
-  <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>
-  <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>
+  <li class="parity0 source" id="l1"><div><span class="c">#!/usr/bin/env python</span></div></li>
+  <li class="parity1 source" id="l2"><div> </div></li>
+  <li class="parity0 source" id="l3"><div><span class="sd">&quot;&quot;&quot;Fun with generators. Corresponding Haskell implementation:</span></div></li>
+  <li class="parity1 source" id="l4"><div> </div></li>
+  <li class="parity0 source" id="l5"><div><span class="sd">primes = 2 : sieve [3, 5..]</span></div></li>
+  <li class="parity1 source" id="l6"><div><span class="sd">    where sieve (p:ns) = p : sieve [n | n &lt;- ns, mod n p /= 0]</span></div></li>
+  <li class="parity0 source" id="l7"><div><span class="sd">&quot;&quot;&quot;</span></div></li>
+  <li class="parity1 source" id="l8"><div> </div></li>
+  <li class="parity0 source" id="l9"><div><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></li>
+  <li class="parity1 source" id="l10"><div> </div></li>
+  <li class="parity0 source" id="l11"><div><span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></div></li>
+  <li class="parity1 source" id="l12"><div>    <span class="sd">&quot;&quot;&quot;Generate all primes.&quot;&quot;&quot;</span></div></li>
+  <li class="parity0 source" id="l13"><div>    <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></div></li>
+  <li class="parity1 source" id="l14"><div>        <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></li>
+  <li class="parity0 source" id="l15"><div>        <span class="c"># It is important to yield *here* in order to stop the</span></div></li>
+  <li class="parity1 source" id="l16"><div>        <span class="c"># infinite recursion.</span></div></li>
+  <li class="parity0 source" id="l17"><div>        <span class="kn">yield</span> <span class="n">p</span></div></li>
+  <li class="parity1 source" id="l18"><div>        <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></li>
+  <li class="parity0 source" id="l19"><div>        <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></li>
+  <li class="parity1 source" id="l20"><div>            <span class="kn">yield</span> <span class="n">n</span></div></li>
+  <li class="parity0 source" id="l21"><div> </div></li>
+  <li class="parity1 source" id="l22"><div>    <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></li>
+  <li class="parity0 source" id="l23"><div>    <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></li>
+  <li class="parity1 source" id="l24"><div> </div></li>
+  <li class="parity0 source" id="l25"><div><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></li>
+  <li class="parity1 source" id="l26"><div>    <span class="kn">import</span> <span class="nn">sys</span></div></li>
+  <li class="parity0 source" id="l27"><div>    <span class="kn">try</span><span class="p">:</span></div></li>
+  <li class="parity1 source" id="l28"><div>        <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></li>
+  <li class="parity0 source" id="l29"><div>    <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></li>
+  <li class="parity1 source" id="l30"><div>        <span class="n">n</span> <span class="o">=</span> <span class="mi">10</span></div></li>
+  <li class="parity0 source" id="l31"><div>    <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></div></li>
+  <li class="parity1 source" id="l32"><div>    <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></li>
+  </ol>
   <div class="sourcelast"></div>
   </div>
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -502,7 +508,11 @@ 
   </div>
   </div>
   
-  <script type="text/javascript">process_dates()</script>
+  <script type="text/javascript">
+  process_dates();
+  highlightLines();
+  addOnclickSource();
+  </script>
   
   
   </body>
@@ -586,24 +596,24 @@ 
   > 
   >     echo % hgweb filerevision, html
   >     "$TESTDIR/get-with-headers.py" localhost:$HGPORT "file/tip/$2" \
-  >         | grep '<div class="parity0 source">'
+  >         | grep '<li class="parity0 source" id="l1">'
   >     echo % errors encountered
   >     cat errors.log
   > }
   $ hgserveget euc-jp eucjp.txt
   % HGENCODING=euc-jp hg serve
   % hgweb filerevision, html
-  <div class="parity0 source"><a href="#l1" id="l1">     1</a> \xb5\xfe</div> (esc)
+  <li class="parity0 source" id="l1"><div>\xb5\xfe</div></li> (esc)
   % errors encountered
   $ hgserveget utf-8 eucjp.txt
   % HGENCODING=utf-8 hg serve
   % hgweb filerevision, html
-  <div class="parity0 source"><a href="#l1" id="l1">     1</a> \xef\xbf\xbd\xef\xbf\xbd</div> (esc)
+  <li class="parity0 source" id="l1"><div>\xef\xbf\xbd\xef\xbf\xbd</div></li> (esc)
   % errors encountered
   $ hgserveget us-ascii eucjp.txt
   % HGENCODING=us-ascii hg serve
   % hgweb filerevision, html
-  <div class="parity0 source"><a href="#l1" id="l1">     1</a> ??</div>
+  <li class="parity0 source" id="l1"><div>??</div></li>
   % errors encountered
 
   $ cd ..