From 97b52f78f93d6f9abe96b9ffceafcc63be49ad51 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 24 Dec 2007 20:00:44 -0200 Subject: [PATCH] Don't request recurse rules when asking where something came from --- src/svn.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/svn.cpp b/src/svn.cpp index d818283..73e7cb4 100644 --- a/src/svn.cpp +++ b/src/svn.cpp @@ -160,8 +160,11 @@ int SvnPrivate::openRepository(const QString &pathToRepository) return EXIT_SUCCESS; } +enum RuleType { AnyRule = 0, NoIgnoreRule = 0x01, NoRecurseRule = 0x02 }; + static MatchRuleList::ConstIterator -findMatchRule(const MatchRuleList &matchRules, int revnum, const QString ¤t) +findMatchRule(const MatchRuleList &matchRules, int revnum, const QString ¤t, + int ruleMask = AnyRule) { MatchRuleList::ConstIterator it = matchRules.constBegin(), end = matchRules.constEnd(); @@ -170,6 +173,10 @@ findMatchRule(const MatchRuleList &matchRules, int revnum, const QString ¤ continue; if (it->maxRevision != -1 && it->maxRevision < revnum) continue; + if (it->action == Rules::Match::Ignore && ruleMask & NoIgnoreRule) + continue; + if (it->action == Rules::Match::Recurse && ruleMask & NoRecurseRule) + continue; if (it->rx.indexIn(current) == 0) return it; } @@ -514,7 +521,7 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *cha if (path.isEmpty() && path_from != NULL) { QString previous = QString::fromUtf8(path_from) + '/'; MatchRuleList::ConstIterator prevmatch = - findMatchRule(matchRules, rev_from, previous); + findMatchRule(matchRules, rev_from, previous, NoRecurseRule | NoIgnoreRule); if (prevmatch != matchRules.constEnd()) { QString prevsvnprefix, prevrepository, prevbranch, prevpath; splitPathName(*prevmatch, previous, &prevsvnprefix, &prevrepository, -- 2.45.0