]> andersk Git - svn-all-fast-export.git/blobdiff - src/repository.cpp
Improve error message
[svn-all-fast-export.git] / src / repository.cpp
index 708db1a439581bb74520b69777f17e7fb2195f03..1c7f8ba30605abad3cef1d37b4b4bb8ea1237e15 100644 (file)
@@ -25,6 +25,8 @@ Repository::Repository(const Rules::Repository &rule)
     foreach (Rules::Repository::Branch branchRule, rule.branches) {
         Branch branch;
         branch.branchFrom = branchRule.branchFrom;
+        if (!branch.branchFrom.startsWith("refs/heads/"))
+            branch.branchFrom.prepend("refs/heads/");
         branch.isCreated = false;
 
         branches.insert(branchRule.name, branch);
@@ -39,7 +41,7 @@ Repository::Repository(const Rules::Repository &rule)
 
 Repository::~Repository()
 {
-    if (fastImport.state() == QProcess::Running) {
+    if (fastImport.state() != QProcess::NotRunning) {
         fastImport.closeWriteChannel();
         fastImport.waitForFinished();
     }
@@ -79,7 +81,7 @@ Repository::Transaction *Repository::newTransaction(const QString &branch, const
                                                     int revnum)
 {
     if (!branches.contains(branch)) {
-        qCritical() << branch << "is not known in repository" << name;
+        qCritical() << branch << "is not a known branch in repository" << name;
         return 0;
     }
 
@@ -156,7 +158,7 @@ void Repository::Transaction::commit()
     QByteArray message = log;
     if (!message.endsWith('\n'))
         message += '\n';
-    message += "\nsvn=" + svnprefix + "; revision=" + QByteArray::number(revnum) + "\n";
+    message += "\nsvn path=" + svnprefix + "; revision=" + QByteArray::number(revnum) + "\n";
 
     {
         QByteArray branchRef = branch;
This page took 0.12365 seconds and 4 git commands to generate.