changeset 36334:4cd2d1cc2a31

pycompat: correct the shlex.split() proxy method signature in py3
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 20 Feb 2018 21:37:30 -0500
parents 579c28576ba5
children d639f60c8eb3
files mercurial/pycompat.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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):