webutil: move from dict() construction to {} literals
authorAugie Fackler <raf@durin42.com>
Wed, 12 Mar 2014 13:20:04 -0400
changeset 20681 52e5aca15f0c
parent 20680 d3d3e94e2910
child 20682 7f8cbaaa8eea
webutil: move from dict() construction to {} literals The latter are both faster and more consistent across Python 2 and 3.
mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py	Wed Mar 12 13:19:43 2014 -0400
+++ b/mercurial/hgweb/webutil.py	Wed Mar 12 13:20:04 2014 -0400
@@ -146,7 +146,7 @@
 def renamelink(fctx):
     r = fctx.renamed()
     if r:
-        return [dict(file=r[0], node=hex(r[1]))]
+        return [{'file': r[0], 'node': hex(r[1])}]
     return []
 
 def nodetagsdict(repo, node):