##// END OF EJS Templates
hgweb: make viewing of non-text work in hgweb...
hgweb: make viewing of non-text work in hgweb We use mimetypes.guess_type to guess file types and util.binary to determine whether a file is displayable as text. This lets us display displayable text files in our normal source view. Files that appear to be binary will be displayed as something like "(binary:image/gif)". Clicking on raw view will send the raw file with an appropriate MIME type. Thus things like GIFs will now be viewable inside hgweb without making a mess. Further, things like postscript files that are text should show source in the normal view and a browser can launch a postscript viewer for the raw view.

File last commit:

r1410:17703aa4 default
r1411:e2ba7885 default
Show More
changeset.tmpl
46 lines | 937 B | application/x-cheetah | CheetahLexer
#header#
<title>#repo|escape#: changeset #node|short#</title>
</head>
<body>
<div class="buttons">
<a href="?cl=#rev#">changelog</a>
<a href="?cmd=tags">tags</a>
<a href="?mf=#manifest|short#">manifest</a>
<a href="?cs=#node|short#;style=raw">raw</a>
#archives%archiveentry#
</div>
<h2>changeset: #desc|escape|firstline#</h2>
<table id="changesetEntry">
<tr>
<th class="changeset">changeset #rev#:</th>
<td class="changeset"><a href="?cs=#node|short#">#node|short#</a></td>
</tr>
#parent#
#changesettag#
<tr>
<th class="author">author:</th>
<td class="author">#author|obfuscate#</td>
</tr>
<tr>
<th class="date">date:</th>
<td class="date">#date|date# (#date|age# ago)</td></tr>
<tr>
<th class="files">files:</th>
<td class="files">#files#</td></tr>
<tr>
<th class="description">description:</th>
<td class="description">#desc|escape|addbreaks#</td>
</tr>
</table>
<div id="changesetDiff">
#diff#
</div>
</body>
</html>