comparison mercurial/hgweb/webutil.py @ 20681:52e5aca15f0c

webutil: move from dict() construction to {} literals The latter are both faster and more consistent across Python 2 and 3.
author Augie Fackler <raf@durin42.com>
date Wed, 12 Mar 2014 13:20:04 -0400
parents f962870712da
children 50981ce36236
comparison
equal deleted inserted replaced
20680:d3d3e94e2910 20681:52e5aca15f0c
144 return _siblings(ctx.children(), hide) 144 return _siblings(ctx.children(), hide)
145 145
146 def renamelink(fctx): 146 def renamelink(fctx):
147 r = fctx.renamed() 147 r = fctx.renamed()
148 if r: 148 if r:
149 return [dict(file=r[0], node=hex(r[1]))] 149 return [{'file': r[0], 'node': hex(r[1])}]
150 return [] 150 return []
151 151
152 def nodetagsdict(repo, node): 152 def nodetagsdict(repo, node):
153 return [{"name": i} for i in repo.nodetags(node)] 153 return [{"name": i} for i in repo.nodetags(node)]
154 154