mercurial/pycompat.py
changeset 43019 2cc453284d5c
parent 40527 1b49b84d5ed5
child 43076 2372284d9457
--- a/mercurial/pycompat.py	Sun Sep 29 11:29:25 2019 -0700
+++ b/mercurial/pycompat.py	Mon Sep 30 00:01:58 2019 +0200
@@ -328,8 +328,11 @@
         ret = shlex.split(s.decode('latin-1'), comments, posix)
         return [a.encode('latin-1') for a in ret]
 
+    shlexquote = shlex.quote
+
 else:
     import cStringIO
+    import pipes
 
     xrange = xrange
     unicode = unicode
@@ -393,6 +396,7 @@
     sysplatform = sys.platform
     sysexecutable = sys.executable
     shlexsplit = shlex.split
+    shlexquote = pipes.quote
     bytesio = cStringIO.StringIO
     stringio = bytesio
     maplist = map