aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago@cassini.local.lan>2007-12-24 12:33:51 -0200
committerThiago Macieira <thiago@cassini.local.lan>2007-12-24 12:33:51 -0200
commit107fa1678676a31440ebc858b349c441d68a79f8 (patch)
tree824db10a3e62ba706411e6492914cac1d6c6ff7d /src
parent1129b4256d605da67bdc3fc87264b070ada2fa53 (diff)
downloadsvn2git-107fa1678676a31440ebc858b349c441d68a79f8.tar
svn2git-107fa1678676a31440ebc858b349c441d68a79f8.tar.gz
svn2git-107fa1678676a31440ebc858b349c441d68a79f8.tar.bz2
svn2git-107fa1678676a31440ebc858b349c441d68a79f8.tar.xz
svn2git-107fa1678676a31440ebc858b349c441d68a79f8.zip
Add some more line number information
Diffstat (limited to 'src')
-rw-r--r--src/ruleparser.cpp2
-rw-r--r--src/ruleparser.h6
-rw-r--r--src/svn.cpp2
3 files changed, 8 insertions, 2 deletions
diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp
index 2371f30..6d3e417 100644
--- a/src/ruleparser.cpp
+++ b/src/ruleparser.cpp
@@ -117,11 +117,13 @@ void Rules::load()
state = ReadingRepository;
repo = Repository(); // clear
repo.name = repoLine.cap(1);
+ repo.lineNumber = lineNumber;
} else if (isMatchRule) {
// match rule
state = ReadingMatch;
match = Match();
match.rx = QRegExp(matchLine.cap(1), Qt::CaseSensitive, QRegExp::RegExp2);
+ match.lineNumber = lineNumber;
} else {
qFatal("Malformed line in rules file: line %d: %s",
lineNumber, qPrintable(origLine));
diff --git a/src/ruleparser.h b/src/ruleparser.h
index 1d561e0..e0e3116 100644
--- a/src/ruleparser.h
+++ b/src/ruleparser.h
@@ -35,6 +35,9 @@ public:
QString name;
QList<Branch> branches;
+ int lineNumber;
+
+ Repository() : lineNumber(0) { }
};
struct Match
@@ -45,8 +48,9 @@ public:
QString path;
int minRevision;
int maxRevision;
+ int lineNumber;
- Match() : minRevision(-1), maxRevision(-1) { }
+ Match() : minRevision(-1), maxRevision(-1), lineNumber(0) { }
};
Rules(const QString &filename);
diff --git a/src/svn.cpp b/src/svn.cpp
index a7c48a1..d294f54 100644
--- a/src/svn.cpp
+++ b/src/svn.cpp
@@ -346,7 +346,7 @@ int SvnPrivate::exportRevision(int revnum)
if (!txn) {
Repository *repo = repositories.value(repository, 0);
if (!repo) {
- qCritical() << "Rule" << rule.rx.pattern()
+ qCritical() << "Rule" << rule.rx.pattern() << "line" << rule.lineNumber
<< "references unknown repository" << repository;
return EXIT_FAILURE;
}