]> andersk Git - svn-all-fast-export.git/commitdiff
Enhance the saving of repository data by adding a "checkpoint" command at the end.
authorThiago Macieira <thiago.macieira@trolltech.com>
Mon, 18 Aug 2008 14:48:32 +0000 (16:48 +0200)
committerThiago Macieira <thiago.macieira@trolltech.com>
Mon, 18 Aug 2008 14:48:32 +0000 (16:48 +0200)
Though I have the impression that this doesn't do much

src/repository.cpp

index 72bbd602b7d2cfe20b6358a9998c831546c607f0..29235e3650082a1a9a35c68ec5e074ca6f29e51d 100644 (file)
@@ -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";
+        }
     }
 }
 
This page took 0.274891 seconds and 5 git commands to generate.