Patchwork hgweb: descend empty directories in monoblue

login
register
mail settings
Submitter Anton Shestakov
Date May 21, 2015, 12:07 p.m.
Message ID <21a8a0d3551a1473555c.1432210066@neuro>
Download mbox | patch
Permalink /patch/9211/
State Accepted
Headers show

Comments

Anton Shestakov - May 21, 2015, 12:07 p.m.
# HG changeset patch
# User Anton Shestakov <engored@ya.ru>
# Date 1432209156 -28800
#      Thu May 21 19:52:36 2015 +0800
# Node ID 21a8a0d3551a1473555c59783e2db8573e26c6e8
# Parent  d950abfcd6b3335f0c93d798e8635e694601da58
hgweb: descend empty directories in monoblue

The ability to "skip" a chain of empty directories in hgweb was added in
c21d236ca897, but monoblue style wasn't updated.

This block is copied from gitweb/map file and just works.
Matt Mackall - May 21, 2015, 5:56 p.m.
On Thu, 2015-05-21 at 20:07 +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <engored@ya.ru>
> # Date 1432209156 -28800
> #      Thu May 21 19:52:36 2015 +0800
> # Node ID 21a8a0d3551a1473555c59783e2db8573e26c6e8
> # Parent  d950abfcd6b3335f0c93d798e8635e694601da58
> hgweb: descend empty directories in monoblue

Queued for default, thanks.

Patch

diff --git a/mercurial/templates/monoblue/map b/mercurial/templates/monoblue/map
--- a/mercurial/templates/monoblue/map
+++ b/mercurial/templates/monoblue/map
@@ -65,7 +65,10 @@  direntry = '
     <td>drwxr-xr-x</td>
     <td></td>
     <td></td>
-    <td><a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}</a></td>
+    <td>
+      <a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">{basename|escape}</a>
+      <a href="{url|urlescape}file/{node|short}{path|urlescape}/{emptydirs|urlescape}{sessionvars%urlparameter}">{emptydirs|escape}</a>
+    </td>
     <td><a href="{url|urlescape}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">files</a></td>
   </tr>'
 fileentry = '