mercurial/util.py
changeset 5481 003d1f174fe1
parent 5454 f2ca8d2c988f
child 5487 7a64931e2d76
--- a/mercurial/util.py	Tue Oct 30 16:54:25 2007 -0700
+++ b/mercurial/util.py	Thu Nov 01 12:05:14 2007 +0100
@@ -1011,6 +1011,13 @@
         # through the current COMSPEC. cmd.exe suppress enclosing quotes.
         return '"' + cmd + '"'
 
+    def popen(command):
+        # Work around "popen spawned process may not write to stdout
+        # under windows"
+        # http://bugs.python.org/issue1366
+        command += " 2> %s" % nulldev
+        return os.popen(quotecommand(command))
+
     def explain_exit(code):
         return _("exited with status %d") % code, code
 
@@ -1168,6 +1175,9 @@
     def quotecommand(cmd):
         return cmd
 
+    def popen(command):
+        return os.popen(command)
+
     def testpid(pid):
         '''return False if pid dead, True if running or not sure'''
         if os.sys.platform == 'OpenVMS':