Chris Foote Chris.Foote@v21.me.uk writes:
There is one major problem with popen2.popen2() that I have found.
It takes different arguments on windows than what it does on unix.
The windows version expects a string, so I have applied the following patch
to get this working for ViewCVS on windows.
Index: subversion/bindings/swig/python/svn/fs.py
===================================================================
--- subversion/bindings/swig/python/svn/fs.py (revision 4614)
+++ subversion/bindings/swig/python/svn/fs.py (working copy)
@@ -19,6 +19,7 @@
### hide these names?
import tempfile
import os
+import sys
import popen2
Why import sys?
@@ -110,7 +111,10 @@
# open the pipe, forget the end for writing to the child (we won't),
# and then return the file object for reading from the child.
- fromchild, tochild = popen2.popen2(cmd)
+ if sys.platform[:3] == 'win':
+ fromchild, tochild = popen2.popen2(string.join(cmd))
+ else:
+ fromchild, tochild = popen2.popen2(cmd)
tochild.close()
return fromchild
Wow, I'm shocked that this code wasn't portable to windows. I hate to
sound like a skeptic ... but I am. Can someone else confirm that this
change is needed? Or point me to a doc so I can learn another new
thing today?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:20:37 2006