Mercurial > public > mercurial-scm > hg
comparison mercurial/hook.py @ 37752:63b7415e37a5
hook: also use pprint on lists for stable output on py2/3
Differential Revision: https://phab.mercurial-scm.org/D3361
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 14 Apr 2018 00:08:59 -0400 |
parents | 483de34f23b1 |
children | 32bc3815efae |
comparison
equal
deleted
inserted
replaced
37751:483de34f23b1 | 37752:63b7415e37a5 |
---|---|
135 env['HG_HOOKNAME'] = name | 135 env['HG_HOOKNAME'] = name |
136 | 136 |
137 for k, v in args.iteritems(): | 137 for k, v in args.iteritems(): |
138 if callable(v): | 138 if callable(v): |
139 v = v() | 139 v = v() |
140 if isinstance(v, dict): | 140 if isinstance(v, (dict, list)): |
141 v = stringutil.pprint(v, bprefix=False) | 141 v = stringutil.pprint(v, bprefix=False) |
142 env['HG_' + k.upper()] = v | 142 env['HG_' + k.upper()] = v |
143 | 143 |
144 if repo: | 144 if repo: |
145 cwd = repo.root | 145 cwd = repo.root |