From patchwork Fri Oct 11 17:55:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7052: phabricator: change conduit data format to match arcanist From: phabricator X-Patchwork-Id: 42234 Message-Id: <9272f9d8714dedbf391f056677700526@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 11 Oct 2019 17:55:29 +0000 Kwan added a comment. Kwan updated this revision to Diff 17082. Fix some test-check-code issues, and one test-check-pyflakes unused local. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7052?vs=17058&id=17082 BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7052/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7052 AFFECTED FILES hgext/phabricator.py CHANGE DETAILS To: Kwan, #hg-reviewers Cc: mercurial-devel diff --git a/hgext/phabricator.py b/hgext/phabricator.py --- a/hgext/phabricator.py +++ b/hgext/phabricator.py @@ -267,8 +267,15 @@ url, authinfo = util.url(b'/'.join([host, b'api', name])).authinfo() ui.debug(b'Conduit Call: %s %s\n' % (url, pycompat.byterepr(params))) params = params.copy() - params[b'api.token'] = token - data = urlencodenested(params) + params[b'__conduit__'] = { + b'token': token, + } + rawdata = { + b'params': templatefilters.json(params), + b'output': b'json', + b'__conduit__': 1, + } + data = urlencodenested(rawdata) curlcmd = ui.config(b'phabricator', b'curlcmd') if curlcmd: sin, sout = procutil.popen2(