comparison contrib/phabricator.py @ 37120:a8a902d7176e

procutil: bulk-replace function calls to point to new module
author Yuya Nishihara <yuya@tcha.org>
date Sat, 24 Mar 2018 15:10:51 +0900
parents f8b65ff02e3e
children 6cf5f5b4eb57
comparison
equal deleted inserted replaced
37119:d4a2e0d5d042 37120:a8a902d7176e
64 smartset, 64 smartset,
65 tags, 65 tags,
66 url as urlmod, 66 url as urlmod,
67 util, 67 util,
68 ) 68 )
69 from mercurial.utils import (
70 procutil,
71 )
69 72
70 cmdtable = {} 73 cmdtable = {}
71 command = registrar.command(cmdtable) 74 command = registrar.command(cmdtable)
72 75
73 colortable = { 76 colortable = {
159 params = params.copy() 162 params = params.copy()
160 params['api.token'] = token 163 params['api.token'] = token
161 data = urlencodenested(params) 164 data = urlencodenested(params)
162 curlcmd = repo.ui.config('phabricator', 'curlcmd') 165 curlcmd = repo.ui.config('phabricator', 'curlcmd')
163 if curlcmd: 166 if curlcmd:
164 sin, sout = util.popen2('%s -d @- %s' % (curlcmd, util.shellquote(url))) 167 sin, sout = procutil.popen2('%s -d @- %s'
168 % (curlcmd, procutil.shellquote(url)))
165 sin.write(data) 169 sin.write(data)
166 sin.close() 170 sin.close()
167 body = sout.read() 171 body = sout.read()
168 else: 172 else:
169 urlopener = urlmod.opener(repo.ui, authinfo) 173 urlopener = urlmod.opener(repo.ui, authinfo)