comparison hgext/convert/cvsps.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 f0b6fbea00cf
children 00e4bd97b095
comparison
equal deleted inserted replaced
37119:d4a2e0d5d042 37120:a8a902d7176e
17 pycompat, 17 pycompat,
18 util, 18 util,
19 ) 19 )
20 from mercurial.utils import ( 20 from mercurial.utils import (
21 dateutil, 21 dateutil,
22 procutil,
22 stringutil, 23 stringutil,
23 ) 24 )
24 25
25 pickle = util.pickle 26 pickle = util.pickle
26 27
221 branchmap = {} # mapping between branch names and revision numbers 222 branchmap = {} # mapping between branch names and revision numbers
222 rcsmap = {} 223 rcsmap = {}
223 state = 0 224 state = 0
224 store = False # set when a new record can be appended 225 store = False # set when a new record can be appended
225 226
226 cmd = [util.shellquote(arg) for arg in cmd] 227 cmd = [procutil.shellquote(arg) for arg in cmd]
227 ui.note(_("running %s\n") % (' '.join(cmd))) 228 ui.note(_("running %s\n") % (' '.join(cmd)))
228 ui.debug("prefix=%r directory=%r root=%r\n" % (prefix, directory, root)) 229 ui.debug("prefix=%r directory=%r root=%r\n" % (prefix, directory, root))
229 230
230 pfp = util.popen(' '.join(cmd)) 231 pfp = procutil.popen(' '.join(cmd))
231 peek = pfp.readline() 232 peek = pfp.readline()
232 while True: 233 while True:
233 line = peek 234 line = peek
234 if line == '': 235 if line == '':
235 break 236 break