# HG changeset patch # User Pierre-Yves David # Date 1618481314 -7200 # Node ID 824ee4aaa09b5cc1ae917be5f3ca4bc0b708c4a8 # Parent 6ce1af5f076405dc407e365904c95525f387ff8c 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 diff -r 6ce1af5f0764 -r 824ee4aaa09b mercurial/templatekw.py --- 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'})