aboutsummaryrefslogtreecommitdiffstats
path: root/src/svn.cpp
diff options
context:
space:
mode:
authorTorgny Nyblom <kde@nyblom.org>2010-12-21 14:49:54 +0100
committerTorgny Nyblom <kde@nyblom.org>2010-12-21 14:49:54 +0100
commit409d8bc4cbaade82672f251c45178c3cfed4619d (patch)
tree4f635ec2d6b56cd541e938ead96c595c3c55bf71 /src/svn.cpp
parent508a67a69eafd07a2e1ce9020983e7113b91d919 (diff)
downloadsvn2git-409d8bc4cbaade82672f251c45178c3cfed4619d.tar
svn2git-409d8bc4cbaade82672f251c45178c3cfed4619d.tar.gz
svn2git-409d8bc4cbaade82672f251c45178c3cfed4619d.tar.bz2
svn2git-409d8bc4cbaade82672f251c45178c3cfed4619d.tar.xz
svn2git-409d8bc4cbaade82672f251c45178c3cfed4619d.zip
Add option for using the real content of an SVN branch when creating a
new branch instead of using the contents of the git "from" branch.
Diffstat (limited to 'src/svn.cpp')
-rw-r--r--src/svn.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/svn.cpp b/src/svn.cpp
index 5a61556..622380f 100644
--- a/src/svn.cpp
+++ b/src/svn.cpp
@@ -730,6 +730,21 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *cha
if (repo->createBranch(branch, revnum, prevbranch, rev_from) == EXIT_FAILURE)
return EXIT_FAILURE;
+
+ Repository::Transaction *txn = transactions.value(repository + branch, 0);
+ if (!txn) {
+ txn = repo->newTransaction(branch, svnprefix, revnum);
+ if (!txn)
+ return EXIT_FAILURE;
+
+ transactions.insert(repository + branch, txn);
+ }
+ if(CommandLineParser::instance()->contains("svn-branches")) {
+ if(ruledebug)
+ qDebug() << "Create a true SVN copy of branch (" << key << "->" << branch << path << ")";
+ txn->deleteFile(path);
+ recursiveDumpDir(txn, fs_root, key, path, pool);
+ }
if (rule.annotate) {
// create an annotated tag
fetchRevProps();