aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTorgny Nyblom <kde@nyblom.org>2010-12-16 09:49:04 +0100
committerTorgny Nyblom <kde@nyblom.org>2010-12-16 09:49:04 +0100
commit7dbe4e29789e76198ea63a004dbbe7d8e1ee72e9 (patch)
treee33231cf6e3d0c7f8ea8702e45c3aafd31d8554e
parentae4fa7288cbfd27296186c85206966461fa20db6 (diff)
downloadsvn2git-7dbe4e29789e76198ea63a004dbbe7d8e1ee72e9.tar
svn2git-7dbe4e29789e76198ea63a004dbbe7d8e1ee72e9.tar.gz
svn2git-7dbe4e29789e76198ea63a004dbbe7d8e1ee72e9.tar.bz2
svn2git-7dbe4e29789e76198ea63a004dbbe7d8e1ee72e9.tar.xz
svn2git-7dbe4e29789e76198ea63a004dbbe7d8e1ee72e9.zip
Be more clear about what are warnings
-rw-r--r--src/CommandLineParser.cpp10
-rw-r--r--src/repository.cpp22
-rw-r--r--src/ruleparser.cpp4
-rw-r--r--src/svn.cpp8
4 files changed, 22 insertions, 22 deletions
diff --git a/src/CommandLineParser.cpp b/src/CommandLineParser.cpp
index 39f40d6..2ce1ba1 100644
--- a/src/CommandLineParser.cpp
+++ b/src/CommandLineParser.cpp
@@ -81,7 +81,7 @@ void CommandLineParser::Private::addDefinitions(const CommandLineOption * option
if (option.indexOf(QLatin1Char(',')) >= 0 && ( option.indexOf(QLatin1Char('[')) < 0 || option.indexOf(QLatin1Char(']')) < 0) ) {
QStringList optionParts = option.split(QLatin1Char(','), QString::SkipEmptyParts);
if (optionParts.count() != 2) {
- qWarning() << "option definition '" << option << "' is faulty; only one ',' allowed";
+ qWarning() << "WARN: option definition '" << option << "' is faulty; only one ',' allowed";
continue;
}
foreach (QString s, optionParts) {
@@ -91,7 +91,7 @@ void CommandLineParser::Private::addDefinitions(const CommandLineOption * option
else if (s.startsWith(QLatin1String("-")) && s.length() > 1)
definition.shortName = s.at(1);
else {
- qWarning() << "option definition '" << option << "' is faulty; the option should start with a -";
+ qWarning() << "WARN: option definition '" << option << "' is faulty; the option should start with a -";
break;
}
}
@@ -99,7 +99,7 @@ void CommandLineParser::Private::addDefinitions(const CommandLineOption * option
else if (option.startsWith(QLatin1String("--")) && option.length() > 2)
definition.name = option.mid(2);
else
- qWarning() << "option definition '" << option << "' has unrecognized format. See the api docs for CommandLineParser for a howto";
+ qWarning() << "WARN: option definition '" << option << "' has unrecognized format. See the api docs for CommandLineParser for a howto";
if(definition.name.isEmpty())
continue;
@@ -292,7 +292,7 @@ void CommandLineParser::init(int argc, char **argv)
void CommandLineParser::addOptionDefinitions(const CommandLineOption * optionList)
{
if (!self) {
- qWarning() << "CommandLineParser:: Use init before addOptionDefinitions!";
+ qWarning() << "WARN: CommandLineParser:: Use init before addOptionDefinitions!";
return;
}
self->d->addDefinitions(optionList);
@@ -308,7 +308,7 @@ CommandLineParser *CommandLineParser::instance()
void CommandLineParser::setArgumentDefinition(const char *definition)
{
if (!self) {
- qWarning() << "CommandLineParser:: Use init before addOptionDefinitions!";
+ qWarning() << "WARN: CommandLineParser:: Use init before addOptionDefinitions!";
return;
}
self->d->setArgumentDefinition(definition);
diff --git a/src/repository.cpp b/src/repository.cpp
index ce6d6ea..6476e1f 100644
--- a/src/repository.cpp
+++ b/src/repository.cpp
@@ -185,12 +185,12 @@ int Repository::setupIncremental(int &cutoff)
goto beyond_cutoff;
if (revnum < last_revnum)
- qWarning() << name << "revision numbers are not monotonic: "
+ qWarning() << "WARN:" << name << "revision numbers are not monotonic: "
<< "got" << QString::number(last_revnum)
<< "and then" << QString::number(revnum);
if (mark > last_valid_mark) {
- qWarning() << name << "unknown commit mark found: rewinding -- did you hit Ctrl-C?";
+ qWarning() << "WARN:" << name << "unknown commit mark found: rewinding -- did you hit Ctrl-C?";
cutoff = revnum;
goto beyond_cutoff;
}
@@ -253,7 +253,7 @@ void Repository::closeFastImport()
if (!fastImport.waitForFinished()) {
fastImport.terminate();
if (!fastImport.waitForFinished(200))
- qWarning() << "git-fast-import for repository" << name << "did not die";
+ qWarning() << "WARN: git-fast-import for repository" << name << "did not die";
}
}
processHasStarted = false;
@@ -323,7 +323,7 @@ int Repository::createBranch(const QString &branch, int revnum,
QByteArray branchFromRef = ":" + QByteArray::number(mark);
if (!mark) {
- qWarning() << branch << "in repository" << name << "is branching but no exported commits exist in repository"
+ qWarning() << "WARN:" << branch << "in repository" << name << "is branching but no exported commits exist in repository"
<< "creating an empty branch.";
branchFromRef = branchFrom.toUtf8();
if (!branchFromRef.startsWith("refs/"))
@@ -351,7 +351,7 @@ int Repository::resetBranch(const QString &branch, int revnum, int mark, const Q
Branch &br = branches[branch];
if (br.created && br.created != revnum && !br.marks.isEmpty() && br.marks.last()) {
QByteArray backupBranch = "refs/backups/r" + QByteArray::number(revnum) + branchRef.mid(4);
- qWarning() << "backing up branch" << branch << "to" << backupBranch;
+ qWarning() << "WARN: backing up branch" << branch << "to" << backupBranch;
resetBranches.append("reset " + backupBranch + "\nfrom " + branchRef + "\n\n");
}
@@ -386,7 +386,7 @@ Repository::Transaction *Repository::newTransaction(const QString &branch, const
{
startFastImport();
if (!branches.contains(branch)) {
- qWarning() << "Transaction:" << branch << "is not a known branch in repository" << name << endl
+ qWarning() << "WARN: Transaction:" << branch << "is not a known branch in repository" << name << endl
<< "Going to create it automatically";
}
@@ -535,7 +535,7 @@ void Repository::Transaction::setLog(const QByteArray &l)
void Repository::Transaction::noteCopyFromBranch(const QString &branchFrom, int branchRevNum)
{
if(branch == branchFrom) {
- qWarning() << "Cannot merge inside a branch";
+ qWarning() << "WARN: Cannot merge inside a branch";
return;
}
static QByteArray dummy;
@@ -543,13 +543,13 @@ void Repository::Transaction::noteCopyFromBranch(const QString &branchFrom, int
Q_ASSERT(dummy.isEmpty());
if (mark == -1) {
- qWarning() << branch << "is copying from branch" << branchFrom
+ qWarning() << "WARN:" << branch << "is copying from branch" << branchFrom
<< "but the latter doesn't exist. Continuing, assuming the files exist.";
} else if (mark == 0) {
- qWarning() << "Unknown revision r" << QByteArray::number(branchRevNum)
+ qWarning() << "WARN: Unknown revision r" << QByteArray::number(branchRevNum)
<< ". Continuing, assuming the files exist.";
} else {
- qWarning() << "repository " + repository->name + " branch " + branch + " has some files copied from " + branchFrom + "@" + QByteArray::number(branchRevNum);
+ qWarning() << "WARN: repository " + repository->name + " branch " + branch + " has some files copied from " + branchFrom + "@" + QByteArray::number(branchRevNum);
if (!merges.contains(mark)) {
merges.append(mark);
@@ -621,7 +621,7 @@ void Repository::Transaction::commit()
if (br.created && !br.marks.isEmpty() && br.marks.last()) {
parentmark = br.marks.last();
} else {
- qWarning() << "Branch" << branch << "in repository" << repository->name << "doesn't exist at revision"
+ qWarning() << "WARN: Branch" << branch << "in repository" << repository->name << "doesn't exist at revision"
<< revnum << "-- did you resume from the wrong revision?";
br.created = revnum;
}
diff --git a/src/ruleparser.cpp b/src/ruleparser.cpp
index f7d201c..6b23d94 100644
--- a/src/ruleparser.cpp
+++ b/src/ruleparser.cpp
@@ -306,7 +306,7 @@ void Stats::Private::ruleMatched(const Rules::Match &rule, const int rev)
const QString name = rule.info();
if(!m_usedRules.contains(name)) {
m_usedRules.insert(name, 1);
- qWarning() << "New match rule, should have been added when created.";
+ qWarning() << "WARN: New match rule, should have been added when created.";
} else {
m_usedRules[name]++;
}
@@ -316,7 +316,7 @@ void Stats::Private::addRule( const Rules::Match &rule)
{
const QString name = rule.info();
if(m_usedRules.contains(name))
- qWarning() << "Rule" << name << "was added multiple times.";
+ qWarning() << "WARN: Rule" << name << "was added multiple times.";
m_usedRules.insert(name, 0);
}
diff --git a/src/svn.cpp b/src/svn.cpp
index cf4ce23..7372a16 100644
--- a/src/svn.cpp
+++ b/src/svn.cpp
@@ -634,7 +634,7 @@ int SvnRevision::exportDispatch(const char *key, const svn_fs_path_change_t *cha
}
// we know that the default action inside recurse is to recurse further or to ignore,
// either of which is reasonably safe for deletion
- qWarning() << "deleting unknown path" << current << "; auto-recursing";
+ qWarning() << "WARN: deleting unknown path" << current << "; auto-recursing";
return recurse(key, change, path_from, matchRules, rev_from, changes, pool);
}
@@ -683,7 +683,7 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *cha
&prevbranch, &prevpath);
} else {
- qWarning() << "SVN reports a \"copy from\" @" << revnum << "from" << path_from << "@" << rev_from << "but no matching rules found! Ignoring copy, treating as a modification";
+ qWarning() << "WARN: SVN reports a \"copy from\" @" << revnum << "from" << path_from << "@" << rev_from << "but no matching rules found! Ignoring copy, treating as a modification";
path_from = NULL;
}
}
@@ -697,7 +697,7 @@ int SvnRevision::exportInternal(const char *key, const svn_fs_path_change_t *cha
<< qPrintable(prevbranch) << "subdir"
<< qPrintable(prevpath);
} else if (prevrepository != repository) {
- qWarning() << qPrintable(current) << "rev" << revnum
+ qWarning() << "WARN:" << qPrintable(current) << "rev" << revnum
<< "is a cross-repository copy (from repository"
<< qPrintable(prevrepository) << "branch"
<< qPrintable(prevbranch) << "path"
@@ -791,7 +791,7 @@ int SvnRevision::recurse(const char *path, const svn_fs_path_change_t *change,
svn_node_kind_t kind;
SVN_ERR(svn_fs_check_path(&kind, fs_root, path, pool));
if(kind == svn_node_none) {
- qWarning() << "Trying to recurse using a nonexistant path" << path << ", ignoring";
+ qWarning() << "WARN: Trying to recurse using a nonexistant path" << path << ", ignoring";
return EXIT_SUCCESS;
}