From ca192b2c6a1c497f9a514c6e68d56929de912f38 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 18 Aug 2008 16:48:32 +0200 Subject: [PATCH] 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 --- src/repository.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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"; + } } } -- 2.45.0