diff options
author | Torgny Nyblom <kde@nyblom.org> | 2010-03-15 19:45:14 +0100 |
---|---|---|
committer | Torgny Nyblom <kde@nyblom.org> | 2010-03-15 19:45:14 +0100 |
commit | 8b4c690f47700ceb242b39aef2609c370c67caf9 (patch) | |
tree | da63455c57ffa87507ed63b795bf4504669e2222 /src/ruleparser.cpp | |
parent | d563a594cfa5f5b6d48325dd3fc48df1b34e329f (diff) | |
download | svn2git-8b4c690f47700ceb242b39aef2609c370c67caf9.tar svn2git-8b4c690f47700ceb242b39aef2609c370c67caf9.tar.gz svn2git-8b4c690f47700ceb242b39aef2609c370c67caf9.tar.bz2 svn2git-8b4c690f47700ceb242b39aef2609c370c67caf9.tar.xz svn2git-8b4c690f47700ceb242b39aef2609c370c67caf9.zip |
Add support for a new rule tag:
rootdir /a/path/
This should be the part of the match that shouldn't be included in the
commited path.
Ex:
match /trunk/kdenetwork/kmail/
rootdir /trunk/kdenetwork/
repository KDE/kdepim
branch master
end match
This would but all matched files/directories under kmail into the
repository under the subdir kmail
Diffstat (limited to 'src/ruleparser.cpp')
-rw-r--r-- | src/ruleparser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp index 7f6f050..c9279ac 100644 --- a/src/ruleparser.cpp +++ b/src/ruleparser.cpp @@ -55,6 +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); QTextStream s(&file); enum { ReadingNone, ReadingRepository, ReadingMatch } state = ReadingNone; @@ -98,6 +99,9 @@ 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); + continue; } else if (matchActionLine.exactMatch(line)) { QString action = matchActionLine.cap(1); if (action == "export") |