Submitter | phabricator |
---|---|
Date | March 9, 2019, 3:01 a.m. |
Message ID | <differential-rev-PHID-DREV-ccohngyqie66cipeg3ln-req@phab.mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/39159/ |
State | Superseded |
Headers | show |
Comments
Patch
diff --git a/hgext/phabricator.py b/hgext/phabricator.py --- a/hgext/phabricator.py +++ b/hgext/phabricator.py @@ -160,7 +160,8 @@ def process(prefix, obj): if isinstance(obj, bool): obj = {True: b'true', False: b'false'}[obj] # Python -> PHP form - items = {list: enumerate, dict: lambda x: x.items()}.get(type(obj)) + lister = lambda l: [(b'%d' % k, v) for k, v in enumerate(l)] + items = {list: lister, dict: lambda x: x.items()}.get(type(obj)) if items is None: flatparams[prefix] = obj else: