aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTorgny Nyblom <kde@nyblom.org>2010-09-04 08:27:05 +0200
committerTorgny Nyblom <kde@nyblom.org>2010-09-04 08:27:05 +0200
commit4676a36759e225c5b737203f99980d6723ecb118 (patch)
tree8538f5c9adef970aa801bace404e9df1cecbea13 /src
parentb1ea588fb2d295a069bf6b59673d5ffa2bd274d6 (diff)
downloadsvn2git-4676a36759e225c5b737203f99980d6723ecb118.tar
svn2git-4676a36759e225c5b737203f99980d6723ecb118.tar.gz
svn2git-4676a36759e225c5b737203f99980d6723ecb118.tar.bz2
svn2git-4676a36759e225c5b737203f99980d6723ecb118.tar.xz
svn2git-4676a36759e225c5b737203f99980d6723ecb118.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/svn.cpp4
1 files changed, 2 insertions, 2 deletions
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"