aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2011-05-28 15:01:51 +0300
committerModestas Vainius <modestas@vainius.eu>2011-05-28 15:01:51 +0300
commit149d6c6e14a1724c96999328683a9264fc508264 (patch)
treebfd268a800684624520eda185902302cd8cc3e38 /src
parent253665969d75816736ba3979fc015a11308d02a8 (diff)
downloadsvn2git-149d6c6e14a1724c96999328683a9264fc508264.tar
svn2git-149d6c6e14a1724c96999328683a9264fc508264.tar.gz
svn2git-149d6c6e14a1724c96999328683a9264fc508264.tar.bz2
svn2git-149d6c6e14a1724c96999328683a9264fc508264.tar.xz
svn2git-149d6c6e14a1724c96999328683a9264fc508264.zip
Properly expand multiple variables in the same line.
When were two or more different variables in the same line, ruleparser used to expand the first one and replace *all* variables (since all variables are matches of variableLine regexp) with that expanded value. The corrent way is to replace that exact variable reference with the expanded value.
Diffstat (limited to 'src')
-rw-r--r--src/ruleparser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp
index ebdba4a..b11ea5b 100644
--- a/src/ruleparser.cpp
+++ b/src/ruleparser.cpp
@@ -188,7 +188,7 @@ void Rules::load(const QString &filename)
qFatal("Undeclared variable: %s", qPrintable(variableLine.cap(1)));
}
}
- line = line.replace(variableLine, replacement);
+ line = line.replace(variableLine.cap(0), replacement);
}
if (state == ReadingRepository) {
if (matchBranchLine.exactMatch(line)) {