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
--- 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'})