aboutsummaryrefslogtreecommitdiffstats
path: root/src/ruleparser.cpp
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2011-04-24 22:25:57 +0300
committerModestas Vainius <modestas@vainius.eu>2011-04-24 22:25:57 +0300
commite8a16c9a47eef7c625686d2a868ec91d05fd95c5 (patch)
tree74b76d3730ee2b9961734ce6589ab659e48eb796 /src/ruleparser.cpp
parent197979b6a641b8b5fa4856c700b1235491c73a41 (diff)
downloadsvn2git-e8a16c9a47eef7c625686d2a868ec91d05fd95c5.tar
svn2git-e8a16c9a47eef7c625686d2a868ec91d05fd95c5.tar.gz
svn2git-e8a16c9a47eef7c625686d2a868ec91d05fd95c5.tar.bz2
svn2git-e8a16c9a47eef7c625686d2a868ec91d05fd95c5.tar.xz
svn2git-e8a16c9a47eef7c625686d2a868ec91d05fd95c5.zip
Support 'description' field in the create repository rule.
Its value is used to fill in repository/description file used by gitweb.
Diffstat (limited to 'src/ruleparser.cpp')
-rw-r--r--src/ruleparser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp
index eb309bf..849a13f 100644
--- a/src/ruleparser.cpp
+++ b/src/ruleparser.cpp
@@ -93,6 +93,7 @@ void Rules::load(const QString &filename)
QRegExp matchLine("match\\s+(.*)", Qt::CaseInsensitive);
QRegExp matchActionLine("action\\s+(\\w+)", Qt::CaseInsensitive);
QRegExp matchRepoLine("repository\\s+(\\S+)", Qt::CaseInsensitive);
+ QRegExp matchDescLine("description\\s+(.+)$", Qt::CaseInsensitive);
QRegExp matchBranchLine("branch\\s+(\\S+)", Qt::CaseInsensitive);
QRegExp matchRevLine("(min|max) revision (\\d+)", Qt::CaseInsensitive);
QRegExp matchAnnotateLine("annotated\\s+(\\S+)", Qt::CaseInsensitive);
@@ -152,6 +153,9 @@ void Rules::load(const QString &filename)
repo.branches += branch;
continue;
+ } else if (matchDescLine.exactMatch(line)) {
+ repo.description = matchDescLine.cap(1);
+ continue;
} else if (matchRepoLine.exactMatch(line)) {
repo.forwardTo = matchRepoLine.cap(1);
continue;