diff -r 44c4a38bf563 -r 0cb09c322647 mercurial/posix.py --- a/mercurial/posix.py Fri Feb 23 23:09:58 2018 +0900 +++ b/mercurial/posix.py Wed Feb 21 22:20:27 2018 +0900 @@ -461,6 +461,10 @@ else: return "'%s'" % s.replace("'", "'\\''") +def shellsplit(s): + """Parse a command string in POSIX shell way (best-effort)""" + return pycompat.shlexsplit(s, posix=True) + def quotecommand(cmd): return cmd