]> andersk Git - svn-all-fast-export.git/blobdiff - src/svn.cpp
Don't crash on empty author
[svn-all-fast-export.git] / src / svn.cpp
index 8d5836b1c3e810930b4aff4e2b6b657b8e034076..dcbd40c66ab787ff999afde7bb6ddbb5d47b2e5c 100644 (file)
@@ -323,9 +323,12 @@ int SvnPrivate::exportRevision(int revnum)
                 continue;
             if (rule.rx.exactMatch(current)) {
                 foundMatch = true;
-                if (rule.repository.isEmpty())
+                if (rule.repository.isEmpty()) {
                     // ignore rule
+                    qDebug() << "..." << qPrintable(current) << "rev" << revnum
+                             << "-> ignored";
                     break;
+                }
 
                 QString repository = current;
                 QString branch = current;
@@ -343,7 +346,7 @@ int SvnPrivate::exportRevision(int revnum)
                 if (!txn) {
                     Repository *repo = repositories.value(repository, 0);
                     if (!repo) {
-                        qCritical() << "Rule" << rule.rx.pattern()
+                        qCritical() << "Rule" << rule.rx.pattern() << "line" << rule.lineNumber
                                     << "references unknown repository" << repository;
                         return EXIT_FAILURE;
                     }
@@ -395,7 +398,7 @@ int SvnPrivate::exportRevision(int revnum)
     svn_string_t *svnlog = (svn_string_t*)apr_hash_get(revprops, "svn:log", APR_HASH_KEY_STRING);
 
     QByteArray log = (char *)svnlog->data;
-    QByteArray authorident = identities.value((char *)svnauthor->data);
+    QByteArray authorident = svnauthor ? identities.value((char *)svnauthor->data) : QByteArray();
     time_t epoch = get_epoch((char*)svndate->data);
     if (authorident.isEmpty()) {
         if (!svnauthor || svn_string_isempty(svnauthor))
This page took 0.026933 seconds and 4 git commands to generate.