forked from qt-creator/qt-creator
VCS: Use correct output style
Change-Id: I95ea8078ae53e7339213765fbb8a79bff33f899c Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
e2aa5b53cf
commit
b0d14c79fe
@@ -536,7 +536,7 @@ void BazaarPlugin::showCommitWidget(const QList<VcsBase::VcsBaseClient::StatusIt
|
|||||||
// Keep the file alive, else it removes self and forgets its name
|
// Keep the file alive, else it removes self and forgets its name
|
||||||
saver.setAutoRemove(false);
|
saver.setAutoRemove(false);
|
||||||
if (!saver.finalize()) {
|
if (!saver.finalize()) {
|
||||||
VcsBase::VcsBaseOutputWindow::instance()->append(saver.errorString());
|
VcsBase::VcsBaseOutputWindow::instance()->appendError(saver.errorString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1513,7 +1513,7 @@ bool ClearCasePlugin::vcsOpen(const QString &workingDir, const QString &fileName
|
|||||||
} else {
|
} else {
|
||||||
VcsBase::VcsBaseOutputWindow *outputWindow = VcsBase::VcsBaseOutputWindow::instance();
|
VcsBase::VcsBaseOutputWindow *outputWindow = VcsBase::VcsBaseOutputWindow::instance();
|
||||||
outputWindow->append(response.stdOut);
|
outputWindow->append(response.stdOut);
|
||||||
outputWindow->append(response.stdErr);
|
outputWindow->appendError(response.stdErr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -781,7 +781,7 @@ void CvsPlugin::startCommit(const QString &workingDir, const QString &file)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (statusOutput.empty()) {
|
if (statusOutput.empty()) {
|
||||||
VcsBaseOutputWindow::instance()->append(tr("There are no modified files."));
|
VcsBaseOutputWindow::instance()->appendWarning(tr("There are no modified files."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_commitRepository = workingDir;
|
m_commitRepository = workingDir;
|
||||||
|
@@ -1170,7 +1170,7 @@ void GitClient::show(const QString &source, const QString &id,
|
|||||||
const QStringList &args, const QString &name)
|
const QStringList &args, const QString &name)
|
||||||
{
|
{
|
||||||
if (!canShow(id)) {
|
if (!canShow(id)) {
|
||||||
outputWindow()->append(msgCannotShow(id));
|
outputWindow()->appendError(msgCannotShow(id));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1550,7 +1550,7 @@ bool GitClient::synchronousRevListCmd(const QString &workingDirectory, const QSt
|
|||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
*errorMessage = commandOutputFromLocal8Bit(errorText);
|
*errorMessage = commandOutputFromLocal8Bit(errorText);
|
||||||
else
|
else
|
||||||
outputWindow()->append(tr("Cannot execute \"git %1\" in \"%2\": %3").arg(
|
outputWindow()->appendError(tr("Cannot execute \"git %1\" in \"%2\": %3").arg(
|
||||||
args.join(QLatin1String(" ")), workingDirectory,
|
args.join(QLatin1String(" ")), workingDirectory,
|
||||||
commandOutputFromLocal8Bit(errorText)));
|
commandOutputFromLocal8Bit(errorText)));
|
||||||
return false;
|
return false;
|
||||||
@@ -1656,7 +1656,7 @@ bool GitClient::synchronousHeadRefs(const QString &workingDirectory, QStringList
|
|||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
*errorMessage = message;
|
*errorMessage = message;
|
||||||
else
|
else
|
||||||
outputWindow()->append(message);
|
outputWindow()->appendError(message);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1885,10 +1885,10 @@ QString GitClient::synchronousStash(const QString &workingDirectory, const QStri
|
|||||||
if (unchanged)
|
if (unchanged)
|
||||||
*unchanged = true;
|
*unchanged = true;
|
||||||
if (!(flags & StashIgnoreUnchanged))
|
if (!(flags & StashIgnoreUnchanged))
|
||||||
outputWindow()->append(msgNoChangedFiles());
|
outputWindow()->appendWarning(msgNoChangedFiles());
|
||||||
break;
|
break;
|
||||||
case StatusFailed:
|
case StatusFailed:
|
||||||
outputWindow()->append(errorMessage);
|
outputWindow()->appendError(errorMessage);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!success)
|
if (!success)
|
||||||
@@ -1946,7 +1946,7 @@ bool GitClient::stashNameFromMessage(const QString &workingDirectory,
|
|||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
*errorMessage = msg;
|
*errorMessage = msg;
|
||||||
else
|
else
|
||||||
outputWindow()->append(msg);
|
outputWindow()->appendError(msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2027,7 +2027,7 @@ QMap<QString,QString> GitClient::synchronousRemotesList(const QString &workingDi
|
|||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
*errorMessage = error;
|
*errorMessage = error;
|
||||||
else
|
else
|
||||||
outputWindow()->append(error);
|
outputWindow()->appendError(error);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
QStringList remotes = output.split(QLatin1String("\n"));
|
QStringList remotes = output.split(QLatin1String("\n"));
|
||||||
@@ -2062,7 +2062,7 @@ QStringList GitClient::synchronousSubmoduleStatus(const QString &workingDirector
|
|||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
*errorMessage = error;
|
*errorMessage = error;
|
||||||
else
|
else
|
||||||
outputWindow()->append(error);
|
outputWindow()->appendError(error);
|
||||||
|
|
||||||
return QStringList();
|
return QStringList();
|
||||||
}
|
}
|
||||||
@@ -2985,11 +2985,11 @@ void GitClient::revert(const QStringList &files, bool revertStaging)
|
|||||||
break;
|
break;
|
||||||
case RevertUnchanged: {
|
case RevertUnchanged: {
|
||||||
const QString msg = (isDirectory || files.size() > 1) ? msgNoChangedFiles() : tr("The file is not modified.");
|
const QString msg = (isDirectory || files.size() > 1) ? msgNoChangedFiles() : tr("The file is not modified.");
|
||||||
outputWindow()->append(msg);
|
outputWindow()->appendWarning(msg);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case RevertFailed:
|
case RevertFailed:
|
||||||
outputWindow()->append(errorMessage);
|
outputWindow()->appendError(errorMessage);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3308,7 +3308,7 @@ bool GitClient::synchronousStashRestore(const QString &workingDirectory,
|
|||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
*errorMessage = msg;
|
*errorMessage = msg;
|
||||||
else
|
else
|
||||||
outputWindow()->append(msg);
|
outputWindow()->appendError(msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
QString output = commandOutputFromLocal8Bit(outputText);
|
QString output = commandOutputFromLocal8Bit(outputText);
|
||||||
@@ -3340,7 +3340,7 @@ bool GitClient::synchronousStashRemove(const QString &workingDirectory,
|
|||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
*errorMessage = msg;
|
*errorMessage = msg;
|
||||||
else
|
else
|
||||||
outputWindow()->append(msg);
|
outputWindow()->appendError(msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
QString output = commandOutputFromLocal8Bit(outputText);
|
QString output = commandOutputFromLocal8Bit(outputText);
|
||||||
@@ -3380,7 +3380,7 @@ bool GitClient::synchronousStashList(const QString &workingDirectory,
|
|||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
*errorMessage = msg;
|
*errorMessage = msg;
|
||||||
else
|
else
|
||||||
outputWindow()->append(msg);
|
outputWindow()->appendError(msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Stash stash;
|
Stash stash;
|
||||||
@@ -3510,7 +3510,7 @@ unsigned GitClient::synchronousGitVersion(QString *errorMessage) const
|
|||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
*errorMessage = msg;
|
*errorMessage = msg;
|
||||||
else
|
else
|
||||||
outputWindow()->append(msg);
|
outputWindow()->appendError(msg);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// cut 'git version 1.6.5.1.sha'
|
// cut 'git version 1.6.5.1.sha'
|
||||||
|
@@ -969,7 +969,7 @@ void GitPlugin::startCommit(CommitType commitType)
|
|||||||
QString errorMessage, commitTemplate;
|
QString errorMessage, commitTemplate;
|
||||||
CommitData data(commitType);
|
CommitData data(commitType);
|
||||||
if (!m_gitClient->getCommitData(state.topLevel(), &commitTemplate, data, &errorMessage)) {
|
if (!m_gitClient->getCommitData(state.topLevel(), &commitTemplate, data, &errorMessage)) {
|
||||||
VcsBase::VcsBaseOutputWindow::instance()->append(errorMessage);
|
VcsBase::VcsBaseOutputWindow::instance()->appendError(errorMessage);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -983,7 +983,7 @@ void GitPlugin::startCommit(CommitType commitType)
|
|||||||
saver.setAutoRemove(false);
|
saver.setAutoRemove(false);
|
||||||
saver.write(commitTemplate.toLocal8Bit());
|
saver.write(commitTemplate.toLocal8Bit());
|
||||||
if (!saver.finalize()) {
|
if (!saver.finalize()) {
|
||||||
VcsBase::VcsBaseOutputWindow::instance()->append(saver.errorString());
|
VcsBase::VcsBaseOutputWindow::instance()->appendError(saver.errorString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_commitMessageFileName = saver.fileName();
|
m_commitMessageFileName = saver.fileName();
|
||||||
@@ -1300,7 +1300,7 @@ void GitPlugin::applyPatch(const QString &workingDirectory, QString file)
|
|||||||
if (errorMessage.isEmpty())
|
if (errorMessage.isEmpty())
|
||||||
outwin->append(tr("Patch %1 successfully applied to %2").arg(file, workingDirectory));
|
outwin->append(tr("Patch %1 successfully applied to %2").arg(file, workingDirectory));
|
||||||
else
|
else
|
||||||
outwin->append(errorMessage);
|
outwin->appendError(errorMessage);
|
||||||
} else {
|
} else {
|
||||||
outwin->appendError(errorMessage);
|
outwin->appendError(errorMessage);
|
||||||
}
|
}
|
||||||
|
@@ -179,7 +179,7 @@ void GitSubmitEditor::updateFileModel()
|
|||||||
setCommitData(data);
|
setCommitData(data);
|
||||||
submitEditorWidget()->refreshLog(m_workingDirectory);
|
submitEditorWidget()->refreshLog(m_workingDirectory);
|
||||||
} else {
|
} else {
|
||||||
VcsBase::VcsBaseOutputWindow::instance()->append(errorMessage);
|
VcsBase::VcsBaseOutputWindow::instance()->appendError(errorMessage);
|
||||||
m_forceClose = true;
|
m_forceClose = true;
|
||||||
Core::EditorManager::instance()->closeEditor(this);
|
Core::EditorManager::instance()->closeEditor(this);
|
||||||
}
|
}
|
||||||
|
@@ -265,7 +265,8 @@ void MergeTool::done()
|
|||||||
outputWindow->append(tr("Merge tool process finished successully."));
|
outputWindow->append(tr("Merge tool process finished successully."));
|
||||||
m_gitClient->continueCommandIfNeeded(workingDirectory);
|
m_gitClient->continueCommandIfNeeded(workingDirectory);
|
||||||
} else {
|
} else {
|
||||||
outputWindow->append(tr("Merge tool process terminated with exit code %1").arg(exitCode));
|
outputWindow->appendError(tr("Merge tool process terminated with exit code %1")
|
||||||
|
.arg(exitCode));
|
||||||
}
|
}
|
||||||
GitPlugin::instance()->gitVersionControl()->emitRepositoryChanged(workingDirectory);
|
GitPlugin::instance()->gitVersionControl()->emitRepositoryChanged(workingDirectory);
|
||||||
deleteLater();
|
deleteLater();
|
||||||
|
@@ -557,7 +557,7 @@ void MercurialPlugin::showCommitWidget(const QList<VcsBaseClient::StatusItem> &s
|
|||||||
// Keep the file alive, else it removes self and forgets its name
|
// Keep the file alive, else it removes self and forgets its name
|
||||||
saver.setAutoRemove(false);
|
saver.setAutoRemove(false);
|
||||||
if (!saver.finalize()) {
|
if (!saver.finalize()) {
|
||||||
VcsBase::VcsBaseOutputWindow::instance()->append(saver.errorString());
|
VcsBase::VcsBaseOutputWindow::instance()->appendError(saver.errorString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1095,7 +1095,7 @@ PerforceResponse PerforcePlugin::fullySynchronousProcess(const QString &workingD
|
|||||||
// Logging
|
// Logging
|
||||||
VcsBase::VcsBaseOutputWindow *outputWindow = VcsBase::VcsBaseOutputWindow::instance();
|
VcsBase::VcsBaseOutputWindow *outputWindow = VcsBase::VcsBaseOutputWindow::instance();
|
||||||
if ((flags & StdErrToWindow) && !response.stdErr.isEmpty())
|
if ((flags & StdErrToWindow) && !response.stdErr.isEmpty())
|
||||||
outputWindow->append(response.stdErr);
|
outputWindow->appendError(response.stdErr);
|
||||||
if ((flags & StdOutToWindow) && !response.stdOut.isEmpty())
|
if ((flags & StdOutToWindow) && !response.stdOut.isEmpty())
|
||||||
outputWindow->append(response.stdOut);
|
outputWindow->append(response.stdOut);
|
||||||
return response;
|
return response;
|
||||||
|
@@ -305,7 +305,7 @@ bool VcsBaseClient::vcsFullySynchronousExec(const QString &workingDir,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!stdErr.isEmpty())
|
if (!stdErr.isEmpty())
|
||||||
::vcsOutputWindow()->append(QString::fromLocal8Bit(stdErr));
|
::vcsOutputWindow()->appendError(QString::fromLocal8Bit(stdErr));
|
||||||
|
|
||||||
return vcsProcess.exitStatus() == QProcess::NormalExit && vcsProcess.exitCode() == 0;
|
return vcsProcess.exitStatus() == QProcess::NormalExit && vcsProcess.exitCode() == 0;
|
||||||
}
|
}
|
||||||
|
@@ -1098,7 +1098,7 @@ bool VcsBasePlugin::runPatch(const QByteArray &input, const QString &workingDire
|
|||||||
if (!stdOut.isEmpty())
|
if (!stdOut.isEmpty())
|
||||||
ow->append(QString::fromLocal8Bit(stdOut));
|
ow->append(QString::fromLocal8Bit(stdOut));
|
||||||
if (!stdErr.isEmpty())
|
if (!stdErr.isEmpty())
|
||||||
ow->append(QString::fromLocal8Bit(stdErr));
|
ow->appendError(QString::fromLocal8Bit(stdErr));
|
||||||
|
|
||||||
if (patchProcess.exitStatus() != QProcess::NormalExit) {
|
if (patchProcess.exitStatus() != QProcess::NormalExit) {
|
||||||
ow->appendError(tr("'%1' crashed.").arg(patch));
|
ow->appendError(tr("'%1' crashed.").arg(patch));
|
||||||
|
Reference in New Issue
Block a user