aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@trolltech.com>2008-08-18 16:48:32 +0200
committerThiago Macieira <thiago.macieira@trolltech.com>2008-08-18 16:48:32 +0200
commitca192b2c6a1c497f9a514c6e68d56929de912f38 (patch)
tree5383541cb8b601b9ca90e5a8759ea74f35cfe022
parentd6da65ded6cab37ef5630b978a6438951ee1e150 (diff)
downloadsvn2git-ca192b2c6a1c497f9a514c6e68d56929de912f38.tar
svn2git-ca192b2c6a1c497f9a514c6e68d56929de912f38.tar.gz
svn2git-ca192b2c6a1c497f9a514c6e68d56929de912f38.tar.bz2
svn2git-ca192b2c6a1c497f9a514c6e68d56929de912f38.tar.xz
svn2git-ca192b2c6a1c497f9a514c6e68d56929de912f38.zip
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
-rw-r--r--src/repository.cpp8
1 files changed, 7 insertions, 1 deletions
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";
+ }
}
}