]> andersk Git - svn-all-fast-export.git/blobdiff - src/repository.cpp
Fix the double UTF-8 encoding of the author name. In hindsight I maybe shouldn't...
[svn-all-fast-export.git] / src / repository.cpp
index 18d145a6b0899f14f7f7044fb7c77da539a605de..ab4c1bf82b3face6973148ad4791ae669dee97a3 100644 (file)
@@ -138,9 +138,9 @@ void Repository::startFastImport()
         outputFile.replace('/', '_');
         outputFile.prepend("log-");
         fastImport.setStandardOutputFile(outputFile, QIODevice::Append);
+        fastImport.setProcessChannelMode(QProcess::MergedChannels);
 
 #ifndef DRY_RUN
-        fastImport.setProcessChannelMode(QProcess::ForwardedChannels);
         fastImport.start("git-fast-import", QStringList());
 #else
         fastImport.start("/bin/cat", QStringList());
@@ -206,7 +206,7 @@ void Repository::Transaction::commit()
         QTextStream s(&repository->fastImport);
         s << "commit " << branchRef << endl;
         s << "mark :" << revnum << endl;
-        s << "committer " << author << ' ' << datetime << " -0000" << endl;
+        s << "committer " << QString::fromUtf8(author) << ' ' << datetime << " -0000" << endl;
 
         Branch &br = repository->branches[branch];
         if (!br.created) {
@@ -243,6 +243,6 @@ void Repository::Transaction::commit()
     repository->fastImport.write("\n");
 
     while (repository->fastImport.bytesToWrite())
-        if (!repository->fastImport.waitForBytesWritten())
+        if (!repository->fastImport.waitForBytesWritten(-1))
             qFatal("Failed to write to process: %s", qPrintable(repository->fastImport.errorString()));
 }
This page took 0.676991 seconds and 4 git commands to generate.