Patchwork [7,of,7] hgweb: wrap {instabilities} by hybridlist()

login
register
mail settings
Submitter Yuya Nishihara
Date May 9, 2018, 1:33 p.m.
Message ID <b2ec62fe2eb0d9965c49.1525872788@mimosa>
Download mbox | patch
Permalink /patch/31433/
State Accepted
Headers show

Comments

Yuya Nishihara - May 9, 2018, 1:33 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1522763913 -32400
#      Tue Apr 03 22:58:33 2018 +0900
# Node ID b2ec62fe2eb0d9965c49797c7432d1f1230224d6
# Parent  8fe4f6447737dd880cff0c3d43327e3e5e64d250
hgweb: wrap {instabilities} by hybridlist()

This is a list of simple values, which can be a hybrid list.
via Mercurial-devel - May 9, 2018, 3:48 p.m.
On Wed, May 9, 2018 at 6:33 AM Yuya Nishihara <yuya@tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1522763913 -32400
> #      Tue Apr 03 22:58:33 2018 +0900
> # Node ID b2ec62fe2eb0d9965c49797c7432d1f1230224d6
> # Parent  8fe4f6447737dd880cff0c3d43327e3e5e64d250
> hgweb: wrap {instabilities} by hybridlist()
>

Queued, thanks.

Patch

diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py
+++ b/mercurial/hgweb/webutil.py
@@ -423,7 +423,8 @@  def commonentry(repo, ctx):
         'phase': ctx.phasestr(),
         'obsolete': ctx.obsolete(),
         'succsandmarkers': succsandmarkers,
-        'instabilities': [{"instability": i} for i in ctx.instabilities()],
+        'instabilities': templateutil.hybridlist(ctx.instabilities(),
+                                                 name='instability'),
         'whyunstable': whyunstable,
         'branch': nodebranchnodefault(ctx),
         'inbranch': nodeinbranch(repo, ctx),