Mercurial > public > mercurial-scm > hg
comparison hgext/phabricator.py @ 47056:067f2c53fb24 stable 5.8
phabricator: adapt to the new `urlutil.url()` API
This avoids a bunch of deprecation warnings in the tests.
Differential Revision: https://phab.mercurial-scm.org/D10541
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 01 May 2021 00:28:39 -0400 |
parents | ffd3e823a7e5 |
children | 7431f5ab0d2a |
comparison
equal
deleted
inserted
replaced
47055:553451522113 | 47056:067f2c53fb24 |
---|---|
401 | 401 |
402 | 402 |
403 def callconduit(ui, name, params): | 403 def callconduit(ui, name, params): |
404 """call Conduit API, params is a dict. return json.loads result, or None""" | 404 """call Conduit API, params is a dict. return json.loads result, or None""" |
405 host, token = readurltoken(ui) | 405 host, token = readurltoken(ui) |
406 url, authinfo = util.url(b'/'.join([host, b'api', name])).authinfo() | 406 url, authinfo = urlutil.url(b'/'.join([host, b'api', name])).authinfo() |
407 ui.debug(b'Conduit Call: %s %s\n' % (url, pycompat.byterepr(params))) | 407 ui.debug(b'Conduit Call: %s %s\n' % (url, pycompat.byterepr(params))) |
408 params = params.copy() | 408 params = params.copy() |
409 params[b'__conduit__'] = { | 409 params[b'__conduit__'] = { |
410 b'token': token, | 410 b'token': token, |
411 } | 411 } |