comparison mercurial/debugcommands.py @ 37123: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 8bac14ce5778
comparison
equal deleted inserted replaced
37122:d4a2e0d5d042 37123:a8a902d7176e
81 wireprotoframing, 81 wireprotoframing,
82 wireprotoserver, 82 wireprotoserver,
83 ) 83 )
84 from .utils import ( 84 from .utils import (
85 dateutil, 85 dateutil,
86 procutil,
86 stringutil, 87 stringutil,
87 ) 88 )
88 89
89 release = lockmod.release 90 release = lockmod.release
90 91
1252 _(" (templates seem to have been installed incorrectly)\n")) 1253 _(" (templates seem to have been installed incorrectly)\n"))
1253 1254
1254 # editor 1255 # editor
1255 editor = ui.geteditor() 1256 editor = ui.geteditor()
1256 editor = util.expandpath(editor) 1257 editor = util.expandpath(editor)
1257 editorbin = util.shellsplit(editor)[0] 1258 editorbin = procutil.shellsplit(editor)[0]
1258 fm.write('editor', _("checking commit editor... (%s)\n"), editorbin) 1259 fm.write('editor', _("checking commit editor... (%s)\n"), editorbin)
1259 cmdpath = util.findexe(editorbin) 1260 cmdpath = procutil.findexe(editorbin)
1260 fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound', 1261 fm.condwrite(not cmdpath and editor == 'vi', 'vinotfound',
1261 _(" No commit editor set and can't find %s in PATH\n" 1262 _(" No commit editor set and can't find %s in PATH\n"
1262 " (specify a commit editor in your configuration" 1263 " (specify a commit editor in your configuration"
1263 " file)\n"), not cmdpath and editor == 'vi' and editorbin) 1264 " file)\n"), not cmdpath and editor == 'vi' and editorbin)
1264 fm.condwrite(not cmdpath and editor != 'vi', 'editornotfound', 1265 fm.condwrite(not cmdpath and editor != 'vi', 'editornotfound',
2811 2812
2812 if opts['localssh']: 2813 if opts['localssh']:
2813 # We start the SSH server in its own process so there is process 2814 # We start the SSH server in its own process so there is process
2814 # separation. This prevents a whole class of potential bugs around 2815 # separation. This prevents a whole class of potential bugs around
2815 # shared state from interfering with server operation. 2816 # shared state from interfering with server operation.
2816 args = util.hgcmd() + [ 2817 args = procutil.hgcmd() + [
2817 '-R', repo.root, 2818 '-R', repo.root,
2818 'debugserve', '--sshstdio', 2819 'debugserve', '--sshstdio',
2819 ] 2820 ]
2820 proc = subprocess.Popen(args, stdin=subprocess.PIPE, 2821 proc = subprocess.Popen(args, stdin=subprocess.PIPE,
2821 stdout=subprocess.PIPE, stderr=subprocess.PIPE, 2822 stdout=subprocess.PIPE, stderr=subprocess.PIPE,