view tests/test-hgweb-descend-empties.out @ 12252:4481f8a93c7a stable

convert/darcs: handle non-ASCII metadata in darcs changelog (issue2354) Given a commit author or message with non-ASCII characters in a darcs repo, convert would raise a UnicodeEncodeError when adding changesets to the hg changelog. This happened because etree returns back unicode objects for any text it can't encode into ASCII. convert was passing these objects to changelog.add(), which would then attempt encoding.fromlocal() on them. This patch ensures converter_source.recode() is called on each piece of commit data returned by etree. (Also note that darcs is currently encoding agnostic and will print out whatever is in a patch's metadata byte-for-byte, even in the XML changelog.)
author Brodie Rao <brodie@bitheap.org>
date Fri, 10 Sep 2010 09:30:50 -0500
parents 1de6e7e1bb9f
children
line wrap: on
line source

% Set up the repo
adding a1/a2/a3/a4/foo
adding b1/b2/b3/b4/foo
adding b1/b2/c3/c4/foo
adding d1/d2/d3/d4/foo
adding d1/d2/foo
% manifest with descending
200 Script output follows

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<head>
<link rel="icon" href="/static/hgicon.png" type="image/png" />
<meta name="robots" content="index, nofollow" />
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />

<title>test: 9087c84a0f5d /</title>
</head>
<body>

<div class="container">
<div class="menu">
<div class="logo">
<a href="http://mercurial.selenic.com/">
<img src="/static/hglogo.png" alt="mercurial" /></a>
</div>
<ul>
<li><a href="/shortlog/9087c84a0f5d">log</a></li>
<li><a href="/graph/9087c84a0f5d">graph</a></li>
<li><a href="/tags">tags</a></li>
<li><a href="/branches">branches</a></li>
</ul>
<ul>
<li><a href="/rev/9087c84a0f5d">changeset</a></li>
<li class="active">browse</li>
</ul>
<ul>

</ul>
</div>

<div class="main">
<h2><a href="/">test</a></h2>
<h3>directory / @ 0:9087c84a0f5d <span class="tag">tip</span> </h3>

<form class="search" action="/log">

<p><input name="rev" id="search1" type="text" size="30" /></p>
<div id="hint">find changesets by author, revision,
files, or words in the commit message</div>
</form>

<table class="bigtable">
<tr>
  <th class="name">name</th>
  <th class="size">size</th>
  <th class="permissions">permissions</th>
</tr>
<tr class="fileline parity0">
  <td class="name"><a href="/file/9087c84a0f5d/">[up]</a></td>
  <td class="size"></td>
  <td class="permissions">drwxr-xr-x</td>
</tr>

<tr class="fileline parity1">
<td class="name">
<a href="/file/9087c84a0f5d/a1">
<img src="/static/coal-folder.png" alt="dir."/> a1/
</a>
<a href="/file/9087c84a0f5d/a1/a2/a3/a4">
a2/a3/a4
</a>
</td>
<td class="size"></td>
<td class="permissions">drwxr-xr-x</td>
</tr>
<tr class="fileline parity0">
<td class="name">
<a href="/file/9087c84a0f5d/b1">
<img src="/static/coal-folder.png" alt="dir."/> b1/
</a>
<a href="/file/9087c84a0f5d/b1/b2">
b2
</a>
</td>
<td class="size"></td>
<td class="permissions">drwxr-xr-x</td>
</tr>
<tr class="fileline parity1">
<td class="name">
<a href="/file/9087c84a0f5d/d1">
<img src="/static/coal-folder.png" alt="dir."/> d1/
</a>
<a href="/file/9087c84a0f5d/d1/d2">
d2
</a>
</td>
<td class="size"></td>
<td class="permissions">drwxr-xr-x</td>
</tr>

</table>
</div>
</div>


</body>
</html>

% ERRORS ENCOUNTERED