convert: call popen2 in binary mode, with a command string.
authorPatrick Mezard <pmezard@gmail.com>
Fri, 14 Sep 2007 22:17:53 +0200
changeset 5303 a76c61679b71
parent 5302 961876838de0
child 5304 b85f7cc133cc
convert: call popen2 in binary mode, with a command string.
hgext/convert/cvs.py
--- a/hgext/convert/cvs.py	Fri Sep 14 22:17:53 2007 +0200
+++ b/hgext/convert/cvs.py	Fri Sep 14 22:17:53 2007 +0200
@@ -163,7 +163,10 @@
                 else:
                     cmd = [rsh, host] + cmd
 
-            self.writep, self.readp = os.popen2(cmd)
+            # popen2 does not support argument lists under Windows
+            cmd = [util.shellquote(arg) for arg in cmd]
+            cmd = util.quotecommand(' '.join(cmd))
+            self.writep, self.readp = os.popen2(cmd, 'b')
 
         self.realroot = root