changeset 47074:824ee4aaa09b

template: make an explicit closure for formatting entry in peerurls This is about to be become significantly more complicated as `ui.path[x]` will become a list. Differential Revision: https://phab.mercurial-scm.org/D10443
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 15 Apr 2021 12:08:34 +0200
parents 6ce1af5f0764
children 0d8ff1f4ab0c
files mercurial/templatekw.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templatekw.py	Thu Apr 15 11:50:08 2021 +0200
+++ b/mercurial/templatekw.py	Thu Apr 15 12:08:34 2021 +0200
@@ -672,7 +672,10 @@
         d.update((o, v) for o, v in sorted(pycompat.iteritems(p.suboptions)))
         return d
 
-    return _hybrid(None, urls, makemap, lambda k: b'%s=%s' % (k, urls[k]))
+    def format_one(k):
+        return b'%s=%s' % (k, urls[k])
+
+    return _hybrid(None, urls, makemap, format_one)
 
 
 @templatekeyword(b"predecessors", requires={b'repo', b'ctx'})