Submitter | phabricator |
---|---|
Date | April 16, 2018, 11:22 p.m. |
Message ID | <4aeef453b2701dc0a23763e1f778e7db@localhost.localdomain> |
Download | mbox | patch |
Permalink | /patch/31144/ |
State | Not Applicable |
Headers | show |
Comments
Patch
diff --git a/mercurial/hook.py b/mercurial/hook.py --- a/mercurial/hook.py +++ b/mercurial/hook.py @@ -21,6 +21,7 @@ ) from .utils import ( procutil, + stringutil, ) def _pythonhook(ui, repo, htype, hname, funcname, args, throw): @@ -137,11 +138,7 @@ if callable(v): v = v() if isinstance(v, dict): - # make the dictionary element order stable across Python - # implementations - v = ('{' + - ', '.join('%r: %r' % i for i in sorted(v.iteritems())) + - '}') + v = stringutil.pprint(v, bprefix=False) env['HG_' + k.upper()] = v if repo: