##// END OF EJS Templates
hook: use stringutil.pprint instead of reinventing it...
Augie Fackler -
r37769:483de34f default
parent child Browse files
Show More
@@ -21,6 +21,7 b' from . import ('
21 )
21 )
22 from .utils import (
22 from .utils import (
23 procutil,
23 procutil,
24 stringutil,
24 )
25 )
25
26
26 def _pythonhook(ui, repo, htype, hname, funcname, args, throw):
27 def _pythonhook(ui, repo, htype, hname, funcname, args, throw):
@@ -137,11 +138,7 b' def _exthook(ui, repo, htype, name, cmd,'
137 if callable(v):
138 if callable(v):
138 v = v()
139 v = v()
139 if isinstance(v, dict):
140 if isinstance(v, dict):
140 # make the dictionary element order stable across Python
141 v = stringutil.pprint(v, bprefix=False)
141 # implementations
142 v = ('{' +
143 ', '.join('%r: %r' % i for i in sorted(v.iteritems())) +
144 '}')
145 env['HG_' + k.upper()] = v
142 env['HG_' + k.upper()] = v
146
143
147 if repo:
144 if repo:
General Comments 0
You need to be logged in to leave comments. Login now