aboutsummaryrefslogtreecommitdiffstats
path: root/src/ruleparser.cpp
diff options
context:
space:
mode:
authorTorgny Nyblom <kde@nyblom.org>2010-04-12 16:58:22 +0200
committerTorgny Nyblom <kde@nyblom.org>2010-04-12 16:58:22 +0200
commit260906c6675b71bcd890e761f23cb7c4a27ac7a8 (patch)
tree87144723a59787cfe3b7f2ab4e711eaa5aa5f2f8 /src/ruleparser.cpp
parent352ad0f90f7d73bec0f36410128cafde183f39ba (diff)
downloadsvn2git-260906c6675b71bcd890e761f23cb7c4a27ac7a8.tar
svn2git-260906c6675b71bcd890e761f23cb7c4a27ac7a8.tar.gz
svn2git-260906c6675b71bcd890e761f23cb7c4a27ac7a8.tar.bz2
svn2git-260906c6675b71bcd890e761f23cb7c4a27ac7a8.tar.xz
svn2git-260906c6675b71bcd890e761f23cb7c4a27ac7a8.zip
Ditch the Rootdir option and add a prefix one instead (Thiago is always correct :))
Diffstat (limited to 'src/ruleparser.cpp')
-rw-r--r--src/ruleparser.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp
index c9279ac..7ae9570 100644
--- a/src/ruleparser.cpp
+++ b/src/ruleparser.cpp
@@ -55,7 +55,7 @@ void Rules::load()
QRegExp matchBranchLine("branch\\s+(\\S+)", Qt::CaseInsensitive);
QRegExp matchRevLine("(min|max) revision (\\d+)", Qt::CaseInsensitive);
QRegExp matchAnnotateLine("annotated\\s+(\\S+)", Qt::CaseInsensitive);
- QRegExp matchRootDirLine("rootdir\\s+(\\S+)", Qt::CaseInsensitive);
+ QRegExp matchPrefixLine("prefix\\s+(\\S+)", Qt::CaseInsensitive);
QTextStream s(&file);
enum { ReadingNone, ReadingRepository, ReadingMatch } state = ReadingNone;
@@ -99,8 +99,10 @@ void Rules::load()
else // must be max
match.maxRevision = matchRevLine.cap(2).toInt();
continue;
- } else if (matchRootDirLine.exactMatch(line)) {
- match.rootdir = QRegExp(matchRootDirLine.cap(1), Qt::CaseSensitive, QRegExp::RegExp2);
+ } 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 );
continue;
} else if (matchActionLine.exactMatch(line)) {
QString action = matchActionLine.cap(1);