aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTorgny Nyblom <kde@nyblom.org>2011-02-07 20:37:39 +0100
committerTorgny Nyblom <kde@nyblom.org>2011-02-07 20:38:04 +0100
commitd5603d03c2ab105c60e6cb43a754b5285e21b667 (patch)
treeb8b228914537cf88a93917183777aab1f1e679b8 /src
parentb3653663ad6a13f80a4928e46e2afcee00f604ce (diff)
downloadsvn2git-d5603d03c2ab105c60e6cb43a754b5285e21b667.tar
svn2git-d5603d03c2ab105c60e6cb43a754b5285e21b667.tar.gz
svn2git-d5603d03c2ab105c60e6cb43a754b5285e21b667.tar.bz2
svn2git-d5603d03c2ab105c60e6cb43a754b5285e21b667.tar.xz
svn2git-d5603d03c2ab105c60e6cb43a754b5285e21b667.zip
Commit branch creation when requested and not on next transaction commit
Branches was created by adding the command to a list, this list was then written to git when the next transaction was committed. This had the side effect that if the branch creation was the last thing the branch was never created.
Diffstat (limited to 'src')
-rw-r--r--src/svn.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/svn.cpp b/src/svn.cpp
index 8b1d2f3..d817907 100644
--- a/src/svn.cpp
+++ b/src/svn.cpp
@@ -393,6 +393,7 @@ public:
uint epoch;
bool ruledebug;
bool propsFetched;
+ bool needCommit;
SvnRevision(int revision, svn_fs_t *f, apr_pool_t *parent_pool)
: pool(parent_pool), fs(f), fs_root(0), revnum(revision), propsFetched(false)
@@ -440,7 +441,7 @@ int SvnPrivate::exportRevision(int revnum)
if (rev.prepareTransactions() == EXIT_FAILURE)
return EXIT_FAILURE;
- if (rev.transactions.isEmpty()) {
+ if (!rev.needCommit) {
printf(" nothing to do\n");
return EXIT_SUCCESS; // no changes?
}
@@ -651,6 +652,7 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *cha
const char *path_from, svn_revnum_t rev_from,
const QString &current, const Rules::Match &rule, const MatchRuleList &matchRules)
{
+ needCommit = true;
QString svnprefix, repository, branch, path;
splitPathName(rule, current, &svnprefix, &repository, &branch, &path);