--- a/mercurial/patch.py Sat Mar 24 15:09:33 2018 +0900
+++ b/mercurial/patch.py Sat Mar 24 15:10:51 2018 +0900
@@ -42,6 +42,7 @@
)
from .utils import (
dateutil,
+ procutil,
stringutil,
)
@@ -2100,9 +2101,9 @@
args = []
cwd = repo.root
if cwd:
- args.append('-d %s' % util.shellquote(cwd))
- fp = util.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip,
- util.shellquote(patchname)))
+ args.append('-d %s' % procutil.shellquote(cwd))
+ fp = procutil.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip,
+ procutil.shellquote(patchname)))
try:
for line in util.iterfile(fp):
line = line.rstrip()
@@ -2130,7 +2131,7 @@
code = fp.close()
if code:
raise PatchError(_("patch command failed: %s") %
- util.explainexit(code)[0])
+ procutil.explainexit(code)[0])
return fuzz
def patchbackend(ui, backend, patchobj, strip, prefix, files=None,