From: Thiago Macieira Date: Mon, 18 Aug 2008 14:48:32 +0000 (+0200) Subject: Enhance the saving of repository data by adding a "checkpoint" command at the end. X-Git-Url: http://andersk.mit.edu/gitweb/svn-all-fast-export.git/commitdiff_plain/ca192b2c6a1c497f9a514c6e68d56929de912f38 Enhance the saving of repository data by adding a "checkpoint" command at the end. Though I have the impression that this doesn't do much --- diff --git a/src/repository.cpp b/src/repository.cpp index 72bbd60..29235e3 100644 --- a/src/repository.cpp +++ b/src/repository.cpp @@ -38,8 +38,14 @@ Repository::Repository(const Rules::Repository &rule) Repository::~Repository() { if (fastImport.state() != QProcess::NotRunning) { + fastImport.write("checkpoint\n"); + fastImport.waitForBytesWritten(-1); fastImport.closeWriteChannel(); - fastImport.waitForFinished(); + if (!fastImport.waitForFinished()) { + fastImport.terminate(); + if (!fastImport.waitForFinished(200)) + qWarning() << "git-fast-import for repository" << name << "did not die"; + } } }