From 4676a36759e225c5b737203f99980d6723ecb118 Mon Sep 17 00:00:00 2001 From: Torgny Nyblom Date: Sat, 4 Sep 2010 08:27:05 +0200 Subject: Make sure that the path part is empty before deleting a whole branch. If the prefix option for a rule is used current == svnprefix does not mean that we are dealing with the root of a branch, path needs to be empty as well. --- src/svn.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/svn.cpp b/src/svn.cpp index 55b8b50..90b63a7 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -627,7 +627,7 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *cha // qDebug() << " " << qPrintable(current) << "rev" << revnum << "->" // << qPrintable(repository) << qPrintable(branch) << qPrintable(path); - if (change->change_kind == svn_fs_path_change_delete && current == svnprefix) { + if (change->change_kind == svn_fs_path_change_delete && current == svnprefix && path.isEmpty()) { if(ruledebug) qDebug() << "repository" << repository << "branch" << branch << "deleted"; return repo->deleteBranch(branch, revnum); @@ -650,7 +650,7 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *cha } // current == svnprefix => we're dealing with the contents of the whole branch here - if (path_from != NULL && current == svnprefix) { + if (path_from != NULL && current == svnprefix && path.isEmpty()) { if (previous != prevsvnprefix) { // source is not the whole of its branch qDebug() << qPrintable(current) << "is a partial branch of repository" -- cgit v1.2.1