--- a/mercurial/templates/monoblue/manifest.tmpl Thu May 31 18:33:49 2018 +0800
+++ b/mercurial/templates/monoblue/manifest.tmpl Thu May 31 18:39:35 2018 +0800
@@ -33,13 +33,7 @@
<p class="files">{path|escape} {alltags}</p>
<table>
- <tr class="parity{upparity}">
- <td>drwxr-xr-x</td>
- <td></td>
- <td></td>
- <td><a href="{url|urlescape}file/{symrev}{up|urlescape}{sessionvars%urlparameter}">[up]</a></td>
- <td class="link"> </td>
- </tr>
+ {ifeq(path, up, '', updirentry)}
{dentries%direntry}
{fentries%fileentry}
</table>
--- a/mercurial/templates/monoblue/map Thu May 31 18:33:49 2018 +0800
+++ b/mercurial/templates/monoblue/map Thu May 31 18:39:35 2018 +0800
@@ -59,6 +59,16 @@
changelogentry = changelogentry.tmpl
changeset = changeset.tmpl
manifest = manifest.tmpl
+updirentry = '
+ <tr class="parity{upparity}">
+ <td>drwxr-xr-x</td>
+ <td></td>
+ <td></td>
+ <td>
+ <a href="{url|urlescape}file/{symrev}{up|urlescape}{sessionvars%urlparameter}">[up]</a>
+ </td>
+ <td class="link"> </td>
+ </tr>'
direntry = '
<tr class="parity{parity}">
<td>drwxr-xr-x</td>
--- a/tests/test-hgweb-descend-empties.t Thu May 31 18:33:49 2018 +0800
+++ b/tests/test-hgweb-descend-empties.t Thu May 31 18:39:35 2018 +0800
@@ -312,13 +312,7 @@
<p class="files">/ <span class="logtags"><span class="phasetag" title="draft">draft</span> <span class="branchtag" title="default">default</span> <span class="tagtag" title="tip">tip</span> </span></p>
<table>
- <tr class="parity0">
- <td>drwxr-xr-x</td>
- <td></td>
- <td></td>
- <td><a href="/file/tip/?style=monoblue">[up]</a></td>
- <td class="link"> </td>
- </tr>
+
<tr class="parity1">
<td>drwxr-xr-x</td>
--- a/tests/test-hgweb-symrev.t Thu May 31 18:33:49 2018 +0800
+++ b/tests/test-hgweb-symrev.t Thu May 31 18:39:35 2018 +0800
@@ -754,7 +754,6 @@
<li><a href="/graph/tip?style=monoblue">graph</a></li>
<li><a href="/rev/tip?style=monoblue">changeset</a></li>
<li><a href="/archive/tip.zip">zip</a></li>
- <td><a href="/file/tip/?style=monoblue">[up]</a></td>
<a href="/file/tip/dir?style=monoblue">dir</a>
<a href="/file/tip/dir/?style=monoblue"></a>
<td><a href="/file/tip/dir?style=monoblue">files</a></td>
@@ -817,7 +816,6 @@
<li><a href="/graph/xyzzy?style=monoblue">graph</a></li>
<li><a href="/rev/xyzzy?style=monoblue">changeset</a></li>
<li><a href="/archive/xyzzy.zip">zip</a></li>
- <td><a href="/file/xyzzy/?style=monoblue">[up]</a></td>
<a href="/file/xyzzy/dir?style=monoblue">dir</a>
<a href="/file/xyzzy/dir/?style=monoblue"></a>
<td><a href="/file/xyzzy/dir?style=monoblue">files</a></td>
--- a/tests/test-hgweb.t Thu May 31 18:33:49 2018 +0800
+++ b/tests/test-hgweb.t Thu May 31 18:39:35 2018 +0800
@@ -812,6 +812,10 @@
[1]
$ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=gitweb' | grep -F '[up]'
<a href="/file/tip/?style=gitweb">[up]</a>
+ $ get-with-headers.py localhost:$HGPORT 'file/tip?style=monoblue' | grep -F '[up]'
+ [1]
+ $ get-with-headers.py localhost:$HGPORT 'file/tip/da?style=monoblue' | grep -F '[up]'
+ <a href="/file/tip/?style=monoblue">[up]</a>
no style can be loaded from directories other than the specified paths