Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Use the subprocess module instead of popen2 to make it work on Windows.
author
Simon Hausmann
<hausmann@kde.org>
Tue, 15 May 2007 12:31:06 +0000
(14:31 +0200)
committer
Simon Hausmann
<shausman@trolltech.com>
Tue, 15 May 2007 12:27:56 +0000
(14:27 +0200)
Signed-off-by: Simon Hausmann <hausmann@kde.org>
contrib/fast-import/git-p4
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
a844b74
)
diff --git
a/contrib/fast-import/git-p4
b/contrib/fast-import/git-p4
index 9927fa142ead96f55087d6036e9ca6fdd47b7ffb..a2f582f8c9c2cac1dc702d889e0da354326a7635 100755
(executable)
--- 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>
#
# License: MIT <http://www.opensource.org/licenses/mit-license.php>
#
-import optparse, sys, os, marshal, popen2, shelve
+import optparse, sys, os, marshal, popen2, s
ubprocess, s
helve
import tempfile, getopt, sha, os.path, time
from sets import Set;
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))
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.
chil
derr
+ 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.
st
derr
if len(self.revision) > 0:
print "Doing initial import of %s from revision %s" % (self.depotPath, self.revision)
if len(self.revision) > 0:
print "Doing initial import of %s from revision %s" % (self.depotPath, self.revision)