diff mercurial/dispatch.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 d4a2e0d5d042
children 6890b7e991a4
line wrap: on
line diff
--- a/mercurial/dispatch.py	Sat Mar 24 15:09:33 2018 +0900
+++ b/mercurial/dispatch.py	Sat Mar 24 15:10:51 2018 +0900
@@ -137,7 +137,7 @@
 else:
     def _initstdio():
         for fp in (sys.stdin, sys.stdout, sys.stderr):
-            util.setbinary(fp)
+            procutil.setbinary(fp)
 
     def _silencestdio():
         pass
@@ -172,7 +172,7 @@
         write(_("(%s)\n") % inst.hint)
 
 def _formatargs(args):
-    return ' '.join(util.shellquote(a) for a in args)
+    return ' '.join(procutil.shellquote(a) for a in args)
 
 def dispatch(req):
     "run the command specified in req.args"
@@ -413,7 +413,7 @@
     if not util.safehasattr(fn, '_origfunc'):
         args = getattr(fn, 'args', args)
     if args:
-        cmd = ' '.join(map(util.shellquote, args))
+        cmd = ' '.join(map(procutil.shellquote, args))
 
         nums = []
         def replacer(m):
@@ -443,7 +443,7 @@
     # parameters, separated out into words. Emulate the same behavior here by
     # quoting the arguments individually. POSIX shells will then typically
     # tokenize each argument into exactly one word.
-    replacemap['"$@"'] = ' '.join(util.shellquote(arg) for arg in args)
+    replacemap['"$@"'] = ' '.join(procutil.shellquote(arg) for arg in args)
     # escape '\$' for regex
     regex = '|'.join(replacemap.keys()).replace('$', br'\$')
     r = re.compile(regex)