aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/repository.cpp25
1 files changed, 1 insertions, 24 deletions
diff --git a/src/repository.cpp b/src/repository.cpp
index d0826e5..d70119b 100644
--- a/src/repository.cpp
+++ b/src/repository.cpp
@@ -312,30 +312,7 @@ int Repository::createBranch(const QString &branch, int revnum,
branchFromDesc += ", deleted/unknown";
}
- QByteArray branchRef = branch.toUtf8();
- if (!branchRef.startsWith("refs/"))
- branchRef.prepend("refs/heads/");
-
- Branch &br = branches[branch];
- if (br.created && br.created != revnum && br.marks.last()) {
- QByteArray backupBranch = branchRef + '_' + QByteArray::number(revnum);
- qWarning() << branch << "already exists; backing up to" << backupBranch;
-
- fastImport.write("reset " + backupBranch + "\nfrom " + branchRef + "\n\n");
- }
-
- // now create the branch
- br.created = revnum;
- br.commits.append(revnum);
- br.marks.append(mark);
-
- fastImport.write("reset " + branchRef + "\nfrom " + branchFromRef + "\n\n"
- "progress SVN r" + QByteArray::number(revnum)
- + " branch " + branch.toUtf8() + " = :" + QByteArray::number(mark)
- + " # " + branchFromDesc
- + "\n\n");
-
- return EXIT_SUCCESS;
+ return resetBranch(branch, revnum, mark, branchFromRef, branchFromDesc);
}
int Repository::deleteBranch(const QString &branch, int revnum)