Use the subprocess module instead of popen2 to make it work on Windows.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
This commit is contained in:
parent
a844b7406f
commit
0848358055
@ -8,7 +8,7 @@
|
|||||||
# License: MIT <http://www.opensource.org/licenses/mit-license.php>
|
# License: MIT <http://www.opensource.org/licenses/mit-license.php>
|
||||||
#
|
#
|
||||||
|
|
||||||
import optparse, sys, os, marshal, popen2, shelve
|
import optparse, sys, os, marshal, popen2, subprocess, shelve
|
||||||
import tempfile, getopt, sha, os.path, time
|
import tempfile, getopt, sha, os.path, time
|
||||||
from sets import Set;
|
from sets import Set;
|
||||||
|
|
||||||
@ -926,10 +926,10 @@ class P4Sync(Command):
|
|||||||
|
|
||||||
self.tz = "%+03d%02d" % (- time.timezone / 3600, ((- time.timezone % 3600) / 60))
|
self.tz = "%+03d%02d" % (- time.timezone / 3600, ((- time.timezone % 3600) / 60))
|
||||||
|
|
||||||
importProcess = popen2.Popen3("git fast-import", capturestderr = True)
|
importProcess = subprocess.Popen(["git", "fast-import"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE);
|
||||||
self.gitOutput = importProcess.fromchild
|
self.gitOutput = importProcess.stdout
|
||||||
self.gitStream = importProcess.tochild
|
self.gitStream = importProcess.stdin
|
||||||
self.gitError = importProcess.childerr
|
self.gitError = importProcess.stderr
|
||||||
|
|
||||||
if len(self.revision) > 0:
|
if len(self.revision) > 0:
|
||||||
print "Doing initial import of %s from revision %s" % (self.depotPath, self.revision)
|
print "Doing initial import of %s from revision %s" % (self.depotPath, self.revision)
|
||||||
|
Loading…
Reference in New Issue
Block a user