Patchwork D3361: hook: also use pprint on lists for stable output on py2/3

login
register
mail settings
Submitter phabricator
Date April 14, 2018, 4:32 a.m.
Message ID <differential-rev-PHID-DREV-cmx4q26ncvovpfb4alaj-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30985/
State Superseded
Headers show

Comments

phabricator - April 14, 2018, 4:32 a.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3361

AFFECTED FILES
  mercurial/hook.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/hook.py b/mercurial/hook.py
--- a/mercurial/hook.py
+++ b/mercurial/hook.py
@@ -137,7 +137,7 @@ 
     for k, v in args.iteritems():
         if callable(v):
             v = v()
-        if isinstance(v, dict):
+        if isinstance(v, (dict, list)):
             v = stringutil.pprint(v, bprefix=False)
         env['HG_' + k.upper()] = v