summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <simon@lst.de>2007-04-15 09:34:15 +0200
committerLibravatar Simon Hausmann <simon@lst.de>2007-04-15 09:34:15 +0200
commit90865adc01213520980459ddc261a019f673cce8 (patch)
treea6f8356154eed6c90cb27d2bc40151ee8a3df529 /contrib
parentSlightly improved formatting of the raw_input questions. (diff)
downloadtgif-90865adc01213520980459ddc261a019f673cce8.tar.xz
A new attempt at fixing the child-fast-import-process-not-finished race condition
in the clone command Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/fast-import/git-p47
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 9c9852c75f..b77cb20e3f 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -907,7 +907,10 @@ class P4Sync(Command):
self.tz = "%+03d%02d" % (- time.timezone / 3600, ((- time.timezone % 3600) / 60))
- self.gitOutput, self.gitStream, self.gitError = popen2.popen3("git fast-import")
+ importProcess = popen2.Popen3("git fast-import", capturestderr = True)
+ self.gitOutput = importProcess.fromchild
+ self.gitStream = importProcess.tochild
+ self.gitError = importProcess.childerr
if len(self.revision) > 0:
print "Doing initial import of %s from revision %s" % (self.globalPrefix, self.revision)
@@ -1028,6 +1031,7 @@ class P4Sync(Command):
self.gitStream.close()
self.gitOutput.close()
self.gitError.close()
+ importProcess.wait()
os.popen("git repo-config p4.depotpath %s" % self.globalPrefix).read()
if len(self.initialTag) > 0:
@@ -1096,7 +1100,6 @@ class P4Clone(P4Sync):
system("git init")
if not P4Sync.run(self, [depotPath]):
return False
- os.wait()
if self.branch != "master":
system("git branch master p4")
system("git checkout -f")