merge patches from brendan cully that did not apply clean against tip.
#header#
<title>#repo|escape#: #file|escape# diff</title>
</head>
<body>
<div class="buttons">
<a href="?cl=#rev#">changelog</a>
<a href="?sl=#rev#">shortlog</a>
<a href="?tags=">tags</a>
<a href="?cs=#node|short#">changeset</a>
<a href="?f=#filenode|short#;file=#file|urlescape#">file</a>
<a href="?fl=#filenode|short#;file=#file|urlescape#">revisions</a>
<a href="?fa=#filenode|short#;file=#file|urlescape#">annotate</a>
<a href="?fd=#node|short#;file=#file|urlescape#;style=raw">raw</a>
</div>
<h2>#file|escape#</h2>
<table id="filediffEntry">
<tr>
<th class="revision">revision #rev#:</th>
<td class="revision"><a href="?cs=#node|short#">#node|short#</a></td>
</tr>
#parent%filediffparent#
#child%filediffchild#
</table>
<div id="fileDiff">
#diff#
</div>
#footer#