]> andersk Git - svn-all-fast-export.git/blobdiff - src/svn.cpp
Add missing calls to svn_stream_close().
[svn-all-fast-export.git] / src / svn.cpp
index e6dc519bc19b09fa5e8576b541bc8cc00e21dfd6..5236579600af2babf06a558823d88e3e927d3bb4 100644 (file)
@@ -122,6 +122,11 @@ void Svn::setRepositories(const RepositoryHash &repositories)
     d->repositories = repositories;
 }
 
+void Svn::setIdentityMap(const IdentityHash &identityMap)
+{
+    d->identities = identityMap;
+}
+
 int Svn::youngestRevision()
 {
     return d->youngestRevision();
@@ -228,9 +233,8 @@ svn_error_t *QIODevice_write(void *baton, const char *data, apr_size_t *len)
     QIODevice *device = reinterpret_cast<QIODevice *>(baton);
     device->write(data, *len);
 
-    while (device->bytesToWrite() > 16*1024) {
-        int timeout = device->bytesToWrite() >= 128*1024 ? -1 : 0;
-        if (!device->waitForBytesWritten(timeout)) {
+    while (device->bytesToWrite() > 32*1024) {
+        if (!device->waitForBytesWritten(-1)) {
             qFatal("Failed to write to process: %s", qPrintable(device->errorString()));
             return svn_error_createf(APR_EOF, SVN_NO_ERROR, "Failed to write to process: %s",
                                      qPrintable(device->errorString()));
@@ -267,6 +271,8 @@ static int dumpBlob(Repository::Transaction *txn, svn_fs_root_t *fs_root,
     // open a generic svn_stream_t for the QIODevice
     out_stream = streamForDevice(io, dumppool);
     SVN_ERR(svn_stream_copy(in_stream, out_stream, dumppool));
+    svn_stream_close(out_stream);
+    svn_stream_close(in_stream);
 
     // print an ending newline
     io->putChar('\n');
@@ -475,7 +481,7 @@ int SvnRevision::exportEntry(const char *key, const svn_fs_path_change_t *change
         }
 
         current += '/';
-        qDebug() << "   " << key << "was copied from" << path_from;
+        qDebug() << "   " << key << "was copied from" << path_from << "rev" << rev_from;
     }
 
     // find the first rule that matches this pathname
@@ -508,8 +514,8 @@ int SvnRevision::exportDispatch(const char *key, const svn_fs_path_change_t *cha
     switch (rule.action) {
     case Rules::Match::Ignore:
         // ignore rule
-        qDebug() << "   " << qPrintable(current) << "rev" << revnum
-                 << "-> ignored (rule" << rule << ")";
+        //qDebug() << "   " << qPrintable(current) << "rev" << revnum
+        //         << "-> ignored (rule" << rule << ")";
         return EXIT_SUCCESS;
 
     case Rules::Match::Recurse:
@@ -627,6 +633,9 @@ int SvnRevision::recurse(const char *path, const svn_fs_path_change_t *change,
         apr_hash_this(i, &vkey, NULL, &value);
 
         svn_fs_dirent_t *dirent = reinterpret_cast<svn_fs_dirent_t *>(value);
+        if (dirent->kind != svn_node_dir)
+            continue;           // not a directory, so can't recurse; skip
+
         QByteArray entry = path + QByteArray("/") + dirent->name;
         QByteArray entryFrom;
         if (path_from)
This page took 0.108419 seconds and 4 git commands to generate.