From d5603d03c2ab105c60e6cb43a754b5285e21b667 Mon Sep 17 00:00:00 2001 From: Torgny Nyblom Date: Mon, 7 Feb 2011 20:37:39 +0100 Subject: 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. --- src/svn.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/svn.cpp') 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 ¤t, const Rules::Match &rule, const MatchRuleList &matchRules) { + needCommit = true; QString svnprefix, repository, branch, path; splitPathName(rule, current, &svnprefix, &repository, &branch, &path); -- cgit v1.2.1