mercurial/windows.py
branchstable
changeset 13188 6c9345f9edca
parent 12689 c52c629ce19e
child 13206 650314ed845d
--- a/mercurial/windows.py	Mon Dec 20 15:26:36 2010 -0600
+++ b/mercurial/windows.py	Wed Dec 22 13:25:00 2010 -0600
@@ -160,9 +160,10 @@
 
 def quotecommand(cmd):
     """Build a command string suitable for os.popen* calls."""
-    # The extra quotes are needed because popen* runs the command
-    # through the current COMSPEC. cmd.exe suppress enclosing quotes.
-    return '"' + cmd + '"'
+    if sys.version_info < (2, 7, 1):
+        # Python versions since 2.7.1 do this extra quoting themselves
+        return '"' + cmd + '"'
+    return cmd
 
 def popen(command, mode='r'):
     # Work around "popen spawned process may not write to stdout