--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -361,6 +361,7 @@ class hgweb(object):
node=hex(fctx.node()),
author=fctx.user(),
date=fctx.date(),
+ desc=fctx.description(),
parent=self.siblings(fctx.parents()),
child=self.siblings(fctx.children()),
rename=self.renamelink(fl, n),
--- a/templates/filerevision.tmpl
+++ b/templates/filerevision.tmpl
@@ -31,6 +31,10 @@
<tr>
<td class="metatag">permissions:</td>
<td>#permissions|permissions#</td></tr>
+<tr>
+ <td class="metatag">description:</td>
+ <td>{desc|strip|escape|addbreaks}</td>
+</tr>
</table>
<pre>
--- a/templates/gitweb/filerevision.tmpl
+++ b/templates/gitweb/filerevision.tmpl
@@ -25,6 +25,7 @@ file |
<div class="title">#file|escape#</div>
+<div class="title_text">
<table>
<tr>
<td class="metatag">changeset #rev#:</td>
@@ -44,6 +45,11 @@ file |
<td class="metatag">permissions:</td>
<td>#permissions|permissions#</td></tr>
</table>
+</div>
+
+<div class="page_path">
+{desc|strip|escape|addbreaks}
+</div>
<div class="page_body">
#text%fileline#