зеркало из https://github.com/microsoft/git.git
git-p4: make closeStreams() idempotent
Ensure that we can safely call self.closeStreams() multiple times, and can also call it even if there is no git fast-import stream at all. Signed-off-by: Luke Diamand <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
c7a6207591
Коммит
837b3a6376
|
@ -3549,11 +3549,14 @@ class P4Sync(Command, P4UserMap):
|
|||
self.gitError = self.importProcess.stderr
|
||||
|
||||
def closeStreams(self):
|
||||
if self.gitStream is None:
|
||||
return
|
||||
self.gitStream.close()
|
||||
if self.importProcess.wait() != 0:
|
||||
die("fast-import failed: %s" % self.gitError.read())
|
||||
self.gitOutput.close()
|
||||
self.gitError.close()
|
||||
self.gitStream = None
|
||||
|
||||
def run(self, args):
|
||||
if self.importIntoRemotes:
|
||||
|
|
Загрузка…
Ссылка в новой задаче