aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorgny Nyblom <kde@nyblom.org>2011-01-16 06:55:43 +0100
committerTorgny Nyblom <kde@nyblom.org>2011-01-16 06:55:43 +0100
commite591675e7a3572bfd002aa5a4019d626a27e1694 (patch)
tree51efc1fd9b3a5c69d59b09c0a76fdd16d559569c
parentb6c93984d2e0ed7f0fb276e99903b7f19cceaf17 (diff)
downloadsvn2git-e591675e7a3572bfd002aa5a4019d626a27e1694.tar
svn2git-e591675e7a3572bfd002aa5a4019d626a27e1694.tar.gz
svn2git-e591675e7a3572bfd002aa5a4019d626a27e1694.tar.bz2
svn2git-e591675e7a3572bfd002aa5a4019d626a27e1694.tar.xz
svn2git-e591675e7a3572bfd002aa5a4019d626a27e1694.zip
Delay transaction creation untill usage.
This might fix the issue with an extra empty diff commit before all tags.
-rw-r--r--src/svn.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/svn.cpp b/src/svn.cpp
index 622380f..8b1d2f3 100644
--- a/src/svn.cpp
+++ b/src/svn.cpp
@@ -731,15 +731,15 @@ 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")) {
+ 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(ruledebug)
qDebug() << "Create a true SVN copy of branch (" << key << "->" << branch << path << ")";
txn->deleteFile(path);