templates/old/filerevision.tmpl
author Edouard Gomez <ed.gomez@free.fr>
Sat, 12 May 2007 00:41:30 +0200
changeset 4834 439e2f2fde42
parent 3264 fc34c031ff54
permissions -rw-r--r--
Fix inconsistency for the stream_out capability in hgweb During some experiments of mine, the uncompressed cloning could not be enabled for hgweb.cgi nor hgwebdir.cgi though the server claimed to be stream_out capable. The only solution was to enable it using the user's .hgrc file. This solution is not acceptable when publishing the repos through an HTTP server because the CGI runs as a www dedicated user whose's home hgrc file may not be accessible to users publishing their repos through their userdir. For such cases we could end up with this typical debug output: hg --debug clone --uncompressed http://server/hg/project destination directory: project sending capabilities command capabilities: lookup changegroupsubset stream=1 unbundle=HG10GZ,HG10BZ,HG10UN sending stream_out command abort: operation forbidden by server The error lies in the fact the hgweb object defines new accessors to the repo configuration that trust things by default (untrusted=True) but the streamclone:stream_out function uses the usual accessors to the repo.ui object, which do not trust by default (untrusted=False) Fix this inconsistency, adding a new parameter to the stream_out function. hgweb then forces a "trust by default" behavior.

#header#
<title>#repo|escape#:#file|escape#</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="?mf=#node|short#;path=#path|urlescape#">manifest</a>
<a href="?fl=#node|short#;file=#file|urlescape#">revisions</a>
<a href="?fa=#node|short#;file=#file|urlescape#">annotate</a>
<a href="?f=#node|short#;file=#file|urlescape#;style=raw">raw</a>
</div>

<h2>#file|escape#</h2>

<table>
<tr>
 <td class="metatag">changeset #rev#:</td>
 <td><a href="?cs=#node|short#">#node|short#</a></td></tr>
#rename%filerename#
#parent%filerevparent#
#child%filerevchild#
<tr>
 <td class="metatag">author:</td>
 <td>#author|obfuscate#</td></tr>
<tr>
 <td class="metatag">date:</td>
 <td>#date|date# (#date|age# ago)</td></tr>
<tr>
 <td class="metatag">permissions:</td>
 <td>#permissions|permissions#</td></tr>
</table>

<pre>
#text%fileline#
</pre>

#footer#