mercurial/dispatch.py
changeset 30678 caf7e1c5efe4
parent 30653 b2be4ccaff1d
child 30917 b35e05103641
child 32050 77eaf9539499
--- a/mercurial/dispatch.py	Fri Dec 23 16:26:40 2016 +0000
+++ b/mercurial/dispatch.py	Sun Dec 25 03:06:55 2016 +0530
@@ -14,7 +14,6 @@
 import os
 import pdb
 import re
-import shlex
 import signal
 import sys
 import time
@@ -279,7 +278,7 @@
         cmd = re.sub(r'\$(\d+|\$)', replacer, cmd)
         givenargs = [x for i, x in enumerate(givenargs)
                      if i not in nums]
-        args = shlex.split(cmd)
+        args = pycompat.shlexsplit(cmd)
     return args + givenargs
 
 def aliasinterpolate(name, args, cmd):
@@ -351,7 +350,7 @@
             return
 
         try:
-            args = shlex.split(self.definition)
+            args = pycompat.shlexsplit(self.definition)
         except ValueError as inst:
             self.badalias = (_("error in definition for alias '%s': %s")
                              % (self.name, inst))
@@ -461,7 +460,7 @@
         args = aliasargs(entry[0], args)
         defaults = ui.config("defaults", cmd)
         if defaults:
-            args = map(util.expandpath, shlex.split(defaults)) + args
+            args = map(util.expandpath, pycompat.shlexsplit(defaults)) + args
         c = list(entry[1])
     else:
         cmd = None