aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ruleparser.cpp4
-rw-r--r--src/svn.cpp5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp
index 7ae9570..6e78efe 100644
--- a/src/ruleparser.cpp
+++ b/src/ruleparser.cpp
@@ -102,7 +102,9 @@ void Rules::load()
} else if (matchPrefixLine.exactMatch(line)) {
match.prefix = matchPrefixLine.cap(1);
if( match.prefix.startsWith('/'))
- qFatal("Prefix starts with \"/\" on line %d, this can cause git-fast-import to crach.", lineNumber );
+ match.prefix = match.prefix.mid(1);
+ if( match.prefix.endsWith('/'))
+ match.prefix.chop(1);
continue;
} else if (matchActionLine.exactMatch(line)) {
QString action = matchActionLine.cap(1);
diff --git a/src/svn.cpp b/src/svn.cpp
index 7a51ea7..5c79920 100644
--- a/src/svn.cpp
+++ b/src/svn.cpp
@@ -216,6 +216,9 @@ static void splitPathName(const Rules::Match &rule, const QString &pathName, QSt
}
if (path_p) {
+ QString path = pathName.mid(svnprefix.length());
+ if( !path.isEmpty() && !rule.prefix.isEmpty() )
+ path.prepend('/');
*path_p = rule.prefix + pathName.mid(svnprefix.length());
}
}
@@ -545,7 +548,7 @@ int SvnRevision::exportDispatch(const char *key, const svn_fs_path_change_t *cha
apr_hash_t *changes, const QString &current,
const Rules::Match &rule, apr_pool_t *pool)
{
- if(CommandLineParser::instance()->contains( QLatin1String("debug-rules")) && rule.action != Rules::Match::Ignore)
+ if(CommandLineParser::instance()->contains( QLatin1String("debug-rules")))
qDebug() << " " << qPrintable(current) << "matched rule:" << rule.lineNumber << "(" << rule.rx.pattern() << ")";
switch (rule.action) {
case Rules::Match::Ignore: