hgext/phabricator.py
changeset 43261 f5aa4a53acd1
parent 43259 162b81e65e60
child 43262 af067d29b19e
--- a/hgext/phabricator.py	Thu Oct 10 18:44:58 2019 +0100
+++ b/hgext/phabricator.py	Sun Oct 06 18:21:01 2019 +0100
@@ -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(