tests/test-highlight.out
author Christian Ebert <blacktrash@gmx.net>
Sat, 04 Apr 2009 15:14:36 +0200
changeset 7959 5fb6edbf0ab8
parent 7725 6a888d491eaf
child 8083 29ac24a36ed7
permissions -rw-r--r--
tests: guess lexer by filename for recent pygments Recent pygments guess AntlrJavaLexer for the isolatin text, converted to ascii by util.tolocal, which yields class="err". Guess lexer by extension instead.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     1
adding get-with-headers.py
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
     2
adding isolatin.txt
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     3
% hg serve
6987
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
     4
% hgweb filerevision, html
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     5
200 Script output follows
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
     6
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
     7
<!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
     8
<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
     9
<head>
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
    10
<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
    11
<meta name="robots" content="index, nofollow" />
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
    12
<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
    13
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
    14
<link rel="stylesheet" href="/highlightcss" type="text/css" />
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
    15
<title>test: 7c3facd7c58a get-with-headers.py</title>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    16
</head>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    17
<body>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    18
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
    19
<div class="container">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
    20
<div class="menu">
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    21
<div class="logo">
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    22
<a href="http://www.selenic.com/mercurial/">
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
    23
<img src="/static/hglogo.png" alt="mercurial" /></a>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    24
</div>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
    25
<ul>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
    26
<li><a href="/shortlog/7c3facd7c58a">log</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
    27
<li><a href="/graph/7c3facd7c58a">graph</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
    28
<li><a href="/tags">tags</a></li>
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>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
    31
<li><a href="/rev/7c3facd7c58a">changeset</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
    32
<li><a href="/file/7c3facd7c58a/">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>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
    36
<li><a href="/diff/7c3facd7c58a/get-with-headers.py">diff</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
    37
<li><a href="/annotate/7c3facd7c58a/get-with-headers.py">annotate</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
    38
<li><a href="/log/7c3facd7c58a/get-with-headers.py">file log</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
    39
<li><a href="/raw-file/7c3facd7c58a/get-with-headers.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>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
    45
<h3>view get-with-headers.py @ 0:7c3facd7c58a</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>
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
    78
<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="n">__doc__</span> <span class="o">=</span> <span class="s">&quot;&quot;&quot;This does HTTP get requests given a host:port and path and returns</span></div><div class="parity1 source"><a href="#l4" id="l4">     4</a> <span class="s">a subset of the headers plus the body of the result.&quot;&quot;&quot;</span></div><div class="parity0 source"><a href="#l5" id="l5">     5</a> </div><div class="parity1 source"><a href="#l6" id="l6">     6</a> <span class="kn">import</span> <span class="nn">httplib</span><span class="o">,</span> <span class="nn">sys</span><span class="o">,</span> <span class="nn">re</span></div><div class="parity0 source"><a href="#l7" id="l7">     7</a> </div><div class="parity1 source"><a href="#l8" id="l8">     8</a> <span class="kn">try</span><span class="p">:</span></div><div class="parity0 source"><a href="#l9" id="l9">     9</a>     <span class="kn">import</span> <span class="nn">msvcrt</span><span class="o">,</span> <span class="nn">os</span></div><div class="parity1 source"><a href="#l10" id="l10">    10</a>     <span class="n">msvcrt</span><span class="o">.</span><span class="n">setmode</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">os</span><span class="o">.</span><span class="n">O_BINARY</span><span class="p">)</span></div><div class="parity0 source"><a href="#l11" id="l11">    11</a>     <span class="n">msvcrt</span><span class="o">.</span><span class="n">setmode</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stderr</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">os</span><span class="o">.</span><span class="n">O_BINARY</span><span class="p">)</span></div><div class="parity1 source"><a href="#l12" id="l12">    12</a> <span class="kn">except</span> <span class="ne">ImportError</span><span class="p">:</span></div><div class="parity0 source"><a href="#l13" id="l13">    13</a>     <span class="kn">pass</span></div><div class="parity1 source"><a href="#l14" id="l14">    14</a> </div><div class="parity0 source"><a href="#l15" id="l15">    15</a> <span class="n">headers</span> <span class="o">=</span> <span class="p">[</span><span class="n">h</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="kn">for</span> <span class="n">h</span> <span class="ow">in</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">3</span><span class="p">:]]</span></div><div class="parity1 source"><a href="#l16" id="l16">    16</a> <span class="n">conn</span> <span class="o">=</span> <span class="n">httplib</span><span class="o">.</span><span class="n">HTTPConnection</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></div><div class="parity0 source"><a href="#l17" id="l17">    17</a> <span class="n">conn</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s">&quot;GET&quot;</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">2</span><span class="p">])</span></div><div class="parity1 source"><a href="#l18" id="l18">    18</a> <span class="n">response</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">getresponse</span><span class="p">()</span></div><div class="parity0 source"><a href="#l19" id="l19">    19</a> <span class="kn">print</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">reason</span></div><div class="parity1 source"><a href="#l20" id="l20">    20</a> <span class="kn">for</span> <span class="n">h</span> <span class="ow">in</span> <span class="n">headers</span><span class="p">:</span></div><div class="parity0 source"><a href="#l21" id="l21">    21</a>     <span class="kn">if</span> <span class="n">response</span><span class="o">.</span><span class="n">getheader</span><span class="p">(</span><span class="n">h</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span></div><div class="parity1 source"><a href="#l22" id="l22">    22</a>         <span class="kn">print</span> <span class="s">&quot;</span><span class="si">%s</span><span class="s">: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">h</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">getheader</span><span class="p">(</span><span class="n">h</span><span class="p">))</span></div><div class="parity0 source"><a href="#l23" id="l23">    23</a> <span class="kn">print</span></div><div class="parity1 source"><a href="#l24" id="l24">    24</a> <span class="n">data</span> <span class="o">=</span> <span class="n">response</span><span class="o">.</span><span class="n">read</span><span class="p">()</span></div><div class="parity0 source"><a href="#l25" id="l25">    25</a> <span class="n">data</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">sub</span><span class="p">(</span><span class="s">&#39;\d+ years&#39;</span><span class="p">,</span> <span class="s">&#39;many years&#39;</span><span class="p">,</span> <span class="n">data</span><span class="p">)</span></div><div class="parity1 source"><a href="#l26" id="l26">    26</a> <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">data</span><span class="p">)</span></div><div class="parity0 source"><a href="#l27" id="l27">    27</a> </div><div class="parity1 source"><a href="#l28" id="l28">    28</a> <span class="kn">if</span> <span class="mf">200</span> <span class="o">&lt;=</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span> <span class="o">&lt;=</span> <span class="mf">299</span><span class="p">:</span></div><div class="parity0 source"><a href="#l29" id="l29">    29</a>     <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">0</span><span class="p">)</span></div><div class="parity1 source"><a href="#l30" id="l30">    30</a> <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span></div>
7395
e2048f5c7bf5 tests: fix tests broken by 03b60f2f90bf
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 7347
diff changeset
    79
<div class="sourcelast"></div>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
    80
</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
    81
</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
    82
</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
    83
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
    84
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    85
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    86
</body>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    87
</html>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    88
7120
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
    89
% hgweb filerevision, html
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
    90
200 Script output follows
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
    91
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
    92
<!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
    93
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
7120
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
    94
<head>
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
    95
<link rel="icon" href="/static/hgicon.png" type="image/png" />
7120
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
    96
<meta name="robots" content="index, nofollow" />
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
    97
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
7120
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
    98
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
    99
<link rel="stylesheet" href="/highlightcss" type="text/css" />
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   100
<title>test: 7c3facd7c58a isolatin.txt</title>
7120
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
   101
</head>
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
   102
<body>
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
   103
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   104
<div class="container">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   105
<div class="menu">
7120
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
   106
<div class="logo">
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
   107
<a href="http://www.selenic.com/mercurial/">
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
   108
<img src="/static/hglogo.png" alt="mercurial" /></a>
7120
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
   109
</div>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   110
<ul>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   111
<li><a href="/shortlog/7c3facd7c58a">log</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   112
<li><a href="/graph/7c3facd7c58a">graph</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   113
<li><a href="/tags">tags</a></li>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   114
</ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   115
<ul>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   116
<li><a href="/rev/7c3facd7c58a">changeset</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   117
<li><a href="/file/7c3facd7c58a/">browse</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   118
</ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   119
<ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   120
<li class="active">file</li>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   121
<li><a href="/diff/7c3facd7c58a/isolatin.txt">diff</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   122
<li><a href="/annotate/7c3facd7c58a/isolatin.txt">annotate</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   123
<li><a href="/log/7c3facd7c58a/isolatin.txt">file log</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   124
<li><a href="/raw-file/7c3facd7c58a/isolatin.txt">raw</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   125
</ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   126
</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   127
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   128
<div class="main">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   129
<h2><a href="/">test</a></h2>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   130
<h3>view isolatin.txt @ 0:7c3facd7c58a</h3>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   131
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   132
<form class="search" action="/log">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   133
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
   134
<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
   135
<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
   136
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
   137
</form>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   138
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   139
<div class="description">a</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   140
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   141
<table id="changesetEntry">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   142
<tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   143
 <th class="author">author</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   144
 <td class="author">&#116;&#101;&#115;&#116;</td>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   145
</tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   146
<tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   147
 <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
   148
 <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
   149
</tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   150
<tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   151
 <th class="author">parents</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   152
 <td class="author"></td>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   153
</tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   154
<tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   155
 <th class="author">children</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   156
 <td class="author"></td>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   157
</tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   158
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   159
</table>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   160
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   161
<div class="overflow">
7395
e2048f5c7bf5 tests: fix tests broken by 03b60f2f90bf
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 7347
diff changeset
   162
<div class="sourcefirst"> line source</div>
e2048f5c7bf5 tests: fix tests broken by 03b60f2f90bf
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 7347
diff changeset
   163
<div class="parity0 source"><a href="#l1" id="l1">     1</a> h?bsch</div>
e2048f5c7bf5 tests: fix tests broken by 03b60f2f90bf
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 7347
diff changeset
   164
<div class="sourcelast"></div>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   165
</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   166
</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   167
</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   168
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   169
7120
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
   170
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
   171
</body>
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
   172
</html>
db7557359636 highlight: convert text to local before passing to pygmentize (issue1341)
Christian Ebert <blacktrash@gmx.net>
parents: 7054
diff changeset
   173
6987
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
   174
% hgweb fileannotate, html
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   175
200 Script output follows
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   176
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
   177
<!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
   178
<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
   179
<head>
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
   180
<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
   181
<meta name="robots" content="index, nofollow" />
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   182
<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
   183
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
   184
<link rel="stylesheet" href="/highlightcss" type="text/css" />
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   185
<title>test: get-with-headers.py annotate</title>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   186
</head>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   187
<body>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   188
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   189
<div class="container">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   190
<div class="menu">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   191
<div class="logo">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   192
<a href="http://www.selenic.com/mercurial/">
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
   193
<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
   194
</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   195
<ul>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   196
<li><a href="/shortlog/7c3facd7c58a">log</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   197
<li><a href="/graph/7c3facd7c58a">graph</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   198
<li><a href="/tags">tags</a></li>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   199
</ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   200
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   201
<ul>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   202
<li><a href="/rev/7c3facd7c58a">changeset</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   203
<li><a href="/file/7c3facd7c58a/">browse</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   204
</ul>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   205
<ul>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   206
<li><a href="/file/7c3facd7c58a/get-with-headers.py">file</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   207
<li><a href="/diff/7c3facd7c58a/get-with-headers.py">diff</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   208
<li class="active">annotate</li>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   209
<li><a href="/log/7c3facd7c58a/get-with-headers.py">file log</a></li>
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   210
<li><a href="/raw-annotate/7c3facd7c58a/get-with-headers.py">raw</a></li>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   211
</ul>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   212
</div>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   213
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   214
<div class="main">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   215
<h2><a href="/">test</a></h2>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   216
<h3>annotate get-with-headers.py @ 0:7c3facd7c58a</h3>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   217
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   218
<form class="search" action="/log">
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   219
7725
6a888d491eaf coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents: 7544
diff changeset
   220
<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
   221
<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
   222
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
   223
</form>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   224
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   225
<div class="description">a</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   226
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   227
<table id="changesetEntry">
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   228
<tr>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   229
 <th class="author">author</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   230
 <td class="author">&#116;&#101;&#115;&#116;</td>
6907
6dcbe191a9b5 Fix up tests
Matt Mackall <mpm@selenic.com>
parents: 6695
diff changeset
   231
</tr>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   232
<tr>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   233
 <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
   234
 <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
   235
</tr>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   236
<tr>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   237
 <th class="author">parents</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   238
 <td class="author"></td>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   239
</tr>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   240
<tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   241
 <th class="author">children</th>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   242
 <td class="author"></td>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   243
</tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   244
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   245
</table>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   246
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   247
<br/>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   248
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   249
<div class="overflow">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   250
<table class="bigtable">
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   251
<tr>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   252
 <th class="annotate">rev</th>
7395
e2048f5c7bf5 tests: fix tests broken by 03b60f2f90bf
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 7347
diff changeset
   253
 <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
   254
</tr>
7959
5fb6edbf0ab8 tests: guess lexer by filename for recent pygments
Christian Ebert <blacktrash@gmx.net>
parents: 7725
diff changeset
   255
<tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#1" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l1" id="l1">     1</a> <span class="c">#!/usr/bin/env python</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#2" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l2" id="l2">     2</a> </td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#3" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l3" id="l3">     3</a> <span class="n">__doc__</span> <span class="o">=</span> <span class="s">&quot;&quot;&quot;This does HTTP get requests given a host:port and path and returns</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#4" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l4" id="l4">     4</a> <span class="s">a subset of the headers plus the body of the result.&quot;&quot;&quot;</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#5" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l5" id="l5">     5</a> </td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#6" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l6" id="l6">     6</a> <span class="kn">import</span> <span class="nn">httplib</span><span class="o">,</span> <span class="nn">sys</span><span class="o">,</span> <span class="nn">re</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#7" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l7" id="l7">     7</a> </td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#8" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l8" id="l8">     8</a> <span class="kn">try</span><span class="p">:</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#9" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l9" id="l9">     9</a>     <span class="kn">import</span> <span class="nn">msvcrt</span><span class="o">,</span> <span class="nn">os</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#10" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l10" id="l10">    10</a>     <span class="n">msvcrt</span><span class="o">.</span><span class="n">setmode</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">os</span><span class="o">.</span><span class="n">O_BINARY</span><span class="p">)</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#11" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l11" id="l11">    11</a>     <span class="n">msvcrt</span><span class="o">.</span><span class="n">setmode</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stderr</span><span class="o">.</span><span class="n">fileno</span><span class="p">(),</span> <span class="n">os</span><span class="o">.</span><span class="n">O_BINARY</span><span class="p">)</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#12" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l12" id="l12">    12</a> <span class="kn">except</span> <span class="ne">ImportError</span><span class="p">:</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#13" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l13" id="l13">    13</a>     <span class="kn">pass</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#14" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l14" id="l14">    14</a> </td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#15" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l15" id="l15">    15</a> <span class="n">headers</span> <span class="o">=</span> <span class="p">[</span><span class="n">h</span><span class="o">.</span><span class="n">lower</span><span class="p">()</span> <span class="kn">for</span> <span class="n">h</span> <span class="ow">in</span> <span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">3</span><span class="p">:]]</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#16" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l16" id="l16">    16</a> <span class="n">conn</span> <span class="o">=</span> <span class="n">httplib</span><span class="o">.</span><span class="n">HTTPConnection</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></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#17" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l17" id="l17">    17</a> <span class="n">conn</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s">&quot;GET&quot;</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">2</span><span class="p">])</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#18" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l18" id="l18">    18</a> <span class="n">response</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">getresponse</span><span class="p">()</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#19" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l19" id="l19">    19</a> <span class="kn">print</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">reason</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#20" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l20" id="l20">    20</a> <span class="kn">for</span> <span class="n">h</span> <span class="ow">in</span> <span class="n">headers</span><span class="p">:</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#21" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l21" id="l21">    21</a>     <span class="kn">if</span> <span class="n">response</span><span class="o">.</span><span class="n">getheader</span><span class="p">(</span><span class="n">h</span><span class="p">,</span> <span class="bp">None</span><span class="p">)</span> <span class="ow">is</span> <span class="ow">not</span> <span class="bp">None</span><span class="p">:</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#22" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l22" id="l22">    22</a>         <span class="kn">print</span> <span class="s">&quot;</span><span class="si">%s</span><span class="s">: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">h</span><span class="p">,</span> <span class="n">response</span><span class="o">.</span><span class="n">getheader</span><span class="p">(</span><span class="n">h</span><span class="p">))</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#23" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l23" id="l23">    23</a> <span class="kn">print</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#24" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l24" id="l24">    24</a> <span class="n">data</span> <span class="o">=</span> <span class="n">response</span><span class="o">.</span><span class="n">read</span><span class="p">()</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#25" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l25" id="l25">    25</a> <span class="n">data</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">sub</span><span class="p">(</span><span class="s">&#39;\d+ years&#39;</span><span class="p">,</span> <span class="s">&#39;many years&#39;</span><span class="p">,</span> <span class="n">data</span><span class="p">)</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#26" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l26" id="l26">    26</a> <span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">data</span><span class="p">)</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#27" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l27" id="l27">    27</a> </td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#28" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l28" id="l28">    28</a> <span class="kn">if</span> <span class="mf">200</span> <span class="o">&lt;=</span> <span class="n">response</span><span class="o">.</span><span class="n">status</span> <span class="o">&lt;=</span> <span class="mf">299</span><span class="p">:</span></td></tr><tr class="parity0"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#29" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l29" id="l29">    29</a>     <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">0</span><span class="p">)</span></td></tr><tr class="parity1"><td class="annotate"><a href="/annotate/7c3facd7c58a/get-with-headers.py#30" title="7c3facd7c58a: a">test@0</a></td><td class="source"><a href="#l30" id="l30">    30</a> <span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mf">1</span><span class="p">)</span></td></tr>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   256
</table>
7339
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   257
</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   258
</div>
d11473955d30 hgweb: update tests for paper style
Matt Mackall <mpm@selenic.com>
parents: 7120
diff changeset
   259
</div>
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   260
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   261
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   262
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   263
</body>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   264
</html>
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   265
6987
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
   266
% hgweb fileannotate, raw
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
   267
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
   268
% hgweb filerevision, raw
d09e813b21e3 highlight: only pygmentize for HTML mimetypes
Rocco Rutte <pdmef@gmx.net>
parents: 6907
diff changeset
   269
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
   270
% hgweb highlightcss friendly
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
   271
200 Script output follows
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
   272
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
   273
/* pygments_style = friendly */
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
   274
6355
3b841c189ab7 tests: add highlight extension tests
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
   275
% errors encountered
6485
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
   276
% hg serve again
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
   277
% hgweb highlightcss fruity
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
   278
200 Script output follows
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
   279
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
   280
/* pygments_style = fruity */
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
   281
938319418d8c highlight: Generate pygments style sheet dynamically
Isaac Jurado <diptongo@gmail.com>
parents: 6355
diff changeset
   282
% errors encountered