diff options
author | Simon Hausmann <hausmann@kde.org> | 2007-05-15 14:31:06 +0200 |
---|---|---|
committer | Simon Hausmann <shausman@trolltech.com> | 2007-05-15 14:27:56 +0200 |
commit | 084835805565726c825f0853626a33a0263066bf (patch) | |
tree | 47514c15dbb3bec2ece98ec819b0b04f86618f16 | |
parent | Document some implementation details, for the curious... :) (diff) | |
download | tgif-084835805565726c825f0853626a33a0263066bf.tar.xz |
Use the subprocess module instead of popen2 to make it work on Windows.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
-rwxr-xr-x | contrib/fast-import/git-p4 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 9927fa142e..a2f582f8c9 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -8,7 +8,7 @@ # 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 from sets import Set; @@ -926,10 +926,10 @@ class P4Sync(Command): self.tz = "%+03d%02d" % (- time.timezone / 3600, ((- time.timezone % 3600) / 60)) - importProcess = popen2.Popen3("git fast-import", capturestderr = True) - self.gitOutput = importProcess.fromchild - self.gitStream = importProcess.tochild - self.gitError = importProcess.childerr + importProcess = subprocess.Popen(["git", "fast-import"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE); + self.gitOutput = importProcess.stdout + self.gitStream = importProcess.stdin + self.gitError = importProcess.stderr if len(self.revision) > 0: print "Doing initial import of %s from revision %s" % (self.depotPath, self.revision) |