aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago@cassini.local.lan>2007-12-24 20:00:44 -0200
committerThiago Macieira <thiago@cassini.local.lan>2007-12-24 20:00:44 -0200
commit97b52f78f93d6f9abe96b9ffceafcc63be49ad51 (patch)
tree23377a94facdc440a2f86ba5bdce1988391ac410
parent898704e4260e2d42c75e123938470dab581a8d80 (diff)
downloadsvn2git-97b52f78f93d6f9abe96b9ffceafcc63be49ad51.tar
svn2git-97b52f78f93d6f9abe96b9ffceafcc63be49ad51.tar.gz
svn2git-97b52f78f93d6f9abe96b9ffceafcc63be49ad51.tar.bz2
svn2git-97b52f78f93d6f9abe96b9ffceafcc63be49ad51.tar.xz
svn2git-97b52f78f93d6f9abe96b9ffceafcc63be49ad51.zip
Don't request recurse rules when asking where something came from
-rw-r--r--src/svn.cpp11
1 files 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 &current)
+findMatchRule(const MatchRuleList &matchRules, int revnum, const QString &current,
+ int ruleMask = AnyRule)
{
MatchRuleList::ConstIterator it = matchRules.constBegin(),
end = matchRules.constEnd();
@@ -170,6 +173,10 @@ findMatchRule(const MatchRuleList &matchRules, int revnum, const QString &curren
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,