[PATCH 2 of 8] hgweb: wrap {pathdef} with mappinglist

Yuya Nishihara yuya at tcha.org
Tue Apr 10 11:41:35 EDT 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1522588476 -32400
#      Sun Apr 01 22:14:36 2018 +0900
# Node ID 42132043359a74ab3d703f1791644a39b8b6e8dc
# Parent  4dcd5d6cbfd17115e4a2359c124ec8887bb7986c
hgweb: wrap {pathdef} with mappinglist

No bare list of mappings should be put in a template mapping.

diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -31,6 +31,7 @@ from .. import (
     repoview,
     templatefilters,
     templater,
+    templateutil,
     ui as uimod,
     util,
     wireprotoserver,
@@ -80,7 +81,7 @@ def makebreadcrumb(url, prefix=''):
             break
         breadcrumb.append({'url': urlel, 'name': pathel})
         urlel = os.path.dirname(urlel)
-    return reversed(breadcrumb)
+    return templateutil.mappinglist(reversed(breadcrumb))
 
 class requestcontext(object):
     """Holds state/context for an individual request.


More information about the Mercurial-devel mailing list