diff options
author | Thiago Macieira <thiago.macieira@trolltech.com> | 2008-08-18 16:48:32 +0200 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@trolltech.com> | 2008-08-18 16:48:32 +0200 |
commit | ca192b2c6a1c497f9a514c6e68d56929de912f38 (patch) | |
tree | 5383541cb8b601b9ca90e5a8759ea74f35cfe022 | |
parent | d6da65ded6cab37ef5630b978a6438951ee1e150 (diff) | |
download | svn2git-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.cpp | 8 |
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"; + } } } |