hgext/phabricator.py
changeset 46907 ffd3e823a7e5
parent 46037 9624bf057c2a
child 47012 d55b71393907
child 47056 067f2c53fb24
equal deleted inserted replaced
46906:33524c46a092 46907:ffd3e823a7e5
   101     util,
   101     util,
   102 )
   102 )
   103 from mercurial.utils import (
   103 from mercurial.utils import (
   104     procutil,
   104     procutil,
   105     stringutil,
   105     stringutil,
       
   106     urlutil,
   106 )
   107 )
   107 from . import show
   108 from . import show
   108 
   109 
   109 
   110 
   110 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
   111 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
   364                     process(b'%s[%s]' % (prefix, k), v)
   365                     process(b'%s[%s]' % (prefix, k), v)
   365                 else:
   366                 else:
   366                     process(k, v)
   367                     process(k, v)
   367 
   368 
   368     process(b'', params)
   369     process(b'', params)
   369     return util.urlreq.urlencode(flatparams)
   370     return urlutil.urlreq.urlencode(flatparams)
   370 
   371 
   371 
   372 
   372 def readurltoken(ui):
   373 def readurltoken(ui):
   373     """return conduit url, token and make sure they exist
   374     """return conduit url, token and make sure they exist
   374 
   375 
   379     if not url:
   380     if not url:
   380         raise error.Abort(
   381         raise error.Abort(
   381             _(b'config %s.%s is required') % (b'phabricator', b'url')
   382             _(b'config %s.%s is required') % (b'phabricator', b'url')
   382         )
   383         )
   383 
   384 
   384     res = httpconnectionmod.readauthforuri(ui, url, util.url(url).user)
   385     res = httpconnectionmod.readauthforuri(ui, url, urlutil.url(url).user)
   385     token = None
   386     token = None
   386 
   387 
   387     if res:
   388     if res:
   388         group, auth = res
   389         group, auth = res
   389 
   390