Mercurial > hg
changeset 20683:6cb419dd3703
templatekw: 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:42 -0400 |
parents | 7f8cbaaa8eea |
children | 2761a791b113 |
files | mercurial/templatekw.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templatekw.py Wed Mar 12 13:20:24 2014 -0400 +++ b/mercurial/templatekw.py Wed Mar 12 13:20:42 2014 -0400 @@ -301,8 +301,8 @@ def showmanifest(**args): repo, ctx, templ = args['repo'], args['ctx'], args['templ'] args = args.copy() - args.update(dict(rev=repo.manifest.rev(ctx.changeset()[0]), - node=hex(ctx.changeset()[0]))) + args.update({'rev': repo.manifest.rev(ctx.changeset()[0]), + 'node': hex(ctx.changeset()[0])}) return templ('manifest', **args) def shownode(repo, ctx, templ, **args):