pycompat: correct the shlex.split() proxy method signature in py3
authorMatt Harbison <matt_harbison@yahoo.com>
Tue, 20 Feb 2018 21:37:30 -0500
changeset 36334 4cd2d1cc2a31
parent 36333 579c28576ba5
child 36335 d639f60c8eb3
pycompat: correct the shlex.split() proxy method signature in py3
mercurial/pycompat.py
--- a/mercurial/pycompat.py	Tue Feb 20 22:23:06 2018 -0500
+++ b/mercurial/pycompat.py	Tue Feb 20 21:37:30 2018 -0500
@@ -261,13 +261,13 @@
         return dic
 
     # TODO: handle shlex.shlex().
-    def shlexsplit(s):
+    def shlexsplit(s, comments=False, posix=True):
         """
         Takes bytes argument, convert it to str i.e. unicodes, pass that into
         shlex.split(), convert the returned value to bytes and return that for
         Python 3 compatibility as shelx.split() don't accept bytes on Python 3.
         """
-        ret = shlex.split(s.decode('latin-1'))
+        ret = shlex.split(s.decode('latin-1'), comments, posix)
         return [a.encode('latin-1') for a in ret]
 
     def emailparser(*args, **kwargs):