diff --git a/src/repository.cpp b/src/repository.cpp index 03bdfc8..8df7b3b 100644 --- a/src/repository.cpp +++ b/src/repository.cpp @@ -87,6 +87,7 @@ class FastImportRepository : public Repository const QByteArray branchNote(const QString& branch) const; void setBranchNote(const QString& branch, const QByteArray& noteText); + bool hasPrefix() const; private: struct Branch { @@ -200,6 +201,9 @@ class ForwardingRepository : public Repository { return repo->branchNote(branch); } void setBranchNote(const QString& branch, const QByteArray& noteText) { repo->setBranchNote(branch, noteText); } + + bool hasPrefix() const + { return !prefix.isEmpty() || repo->hasPrefix(); } }; class ProcessCache: QLinkedList @@ -766,6 +770,11 @@ void FastImportRepository::setBranchNote(const QString& branch, const QByteArray branches[branch].note = noteText; } +bool FastImportRepository::hasPrefix() const +{ + return !prefix.isEmpty(); +} + FastImportRepository::Transaction::~Transaction() { repository->forgetTransaction(this); diff --git a/src/repository.h b/src/repository.h index 8e03415..649be2d 100644 --- a/src/repository.h +++ b/src/repository.h @@ -137,6 +137,8 @@ class Repository virtual bool branchExists(const QString& branch) const = 0; virtual const QByteArray branchNote(const QString& branch) const = 0; virtual void setBranchNote(const QString& branch, const QByteArray& noteText) = 0; + + virtual bool hasPrefix() const = 0; }; Repository *createRepository(const Rules::Repository &rule, const QHash &repositories); diff --git a/src/svn.cpp b/src/svn.cpp index 02800bb..f5648d1 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -706,7 +706,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 && path.isEmpty()) { + if (change->change_kind == svn_fs_path_change_delete && current == svnprefix && path.isEmpty() && !repo->hasPrefix()) { if(ruledebug) qDebug() << "repository" << repository << "branch" << branch << "deleted"; return repo->deleteBranch(branch, revnum);