]> andersk Git - svn-all-fast-export.git/blobdiff - src/repository.cpp
Prepend refs/heads/ to the origin branch too
[svn-all-fast-export.git] / src / repository.cpp
index c3f52fb1e4e815a73a74708ffa82ceb1d808c6b5..b85988514307596d0fa76e923d2152a3b0ca4299 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();
     }
@@ -69,7 +71,7 @@ void Repository::reloadBranches()
         if (branchExists) {
             startFastImport();
             fastImport.write("reset " + branchRef.toUtf8() +
-                             "\nfrom " + branchRef.toUtf8() + "^0\n");
+                             "\nfrom " + branchRef.toUtf8() + "^0\n\n");
             it->isCreated = true;
         }
     }
@@ -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.027396 seconds and 4 git commands to generate.