Details
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHG63b7415e37a5: hook: also use pprint on lists for stable output on py2/3
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
indygreg |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/hook.py (2 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 | ||
Closed | durin42 |
if tr and tr.writepending(): | if tr and tr.writepending(): | ||||
env['HG_PENDING'] = repo.root | env['HG_PENDING'] = repo.root | ||||
env['HG_HOOKTYPE'] = htype | env['HG_HOOKTYPE'] = htype | ||||
env['HG_HOOKNAME'] = name | env['HG_HOOKNAME'] = name | ||||
for k, v in args.iteritems(): | for k, v in args.iteritems(): | ||||
if callable(v): | if callable(v): | ||||
v = v() | v = v() | ||||
if isinstance(v, dict): | if isinstance(v, (dict, list)): | ||||
v = stringutil.pprint(v, bprefix=False) | v = stringutil.pprint(v, bprefix=False) | ||||
env['HG_' + k.upper()] = v | env['HG_' + k.upper()] = v | ||||
if repo: | if repo: | ||||
cwd = repo.root | cwd = repo.root | ||||
else: | else: | ||||
cwd = pycompat.getcwd() | cwd = pycompat.getcwd() | ||||
r = ui.system(cmd, environ=env, cwd=cwd, blockedtag='exthook-%s' % (name,)) | r = ui.system(cmd, environ=env, cwd=cwd, blockedtag='exthook-%s' % (name,)) |