diff -r 942a5a34b2d0 -r d65ecb814fc0 mercurial/posix.py --- a/mercurial/posix.py Mon Feb 02 14:26:47 2015 -0500 +++ b/mercurial/posix.py Wed Feb 11 19:57:07 2015 +0900 @@ -322,7 +322,7 @@ global _needsshellquote if _needsshellquote is None: _needsshellquote = re.compile(r'[^a-zA-Z0-9._/-]').search - if not _needsshellquote(s): + if s and not _needsshellquote(s): # "s" shouldn't have to be quoted return s else: