changeset 24156:75a2df2bbde8 stable

templatekw: inline showlist() into showbookmarks() showlist() is the helper to build _hybrid object from a trivial list. It can't be applied if each value has more than one items, 'bookmark' and 'current' in this case. This change is necessary to fix random failure of "{join(bookmarks, sep)}".
author Yuya Nishihara <yuya@tcha.org>
date Wed, 18 Feb 2015 22:10:17 +0900
parents e5ce49a30146
children d091f62be5ae
files mercurial/templatekw.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templatekw.py	Mon Mar 02 00:12:29 2015 -0600
+++ b/mercurial/templatekw.py	Wed Feb 18 22:10:17 2015 +0900
@@ -199,10 +199,10 @@
     """
     repo = args['ctx']._repo
     bookmarks = args['ctx'].bookmarks()
-    hybrid = showlist('bookmark', bookmarks, **args)
-    for value in hybrid.values:
-        value['current'] = repo._bookmarkcurrent
-    return hybrid
+    current = repo._bookmarkcurrent
+    c = [{'bookmark': x, 'current': current} for x in bookmarks]
+    f = _showlist('bookmark', bookmarks, **args)
+    return _hybrid(f, c)
 
 def showchildren(**args):
     """:children: List of strings. The children of the changeset."""