Commit beac53ad authored by Petar Perisin's avatar Petar Perisin
Browse files

Gerrit - use new diff editor for diff



Change-Id: I7ba84491a5f6796ff446c2e21487ed4c04441b82
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 3729f4aa
......@@ -202,11 +202,11 @@ void GerritDialog::displayRepositoryPath()
if (m_repositoryChooser->path().isEmpty())
m_repositoryChooser->setPath(m_parameters->repositoryPath);
if (m_parameters->promptPath) {
m_displayButton->setText(tr("&Diff..."));
m_displayButton->setText(tr("&Show..."));
m_cherryPickButton->setText(tr("Cherry &Pick..."));
m_checkoutButton->setText(tr("&Checkout..."));
} else {
m_displayButton->setText(tr("&Diff"));
m_displayButton->setText(tr("&Show"));
m_cherryPickButton->setText(tr("Cherry &Pick"));
m_checkoutButton->setText(tr("&Checkout"));
}
......
......@@ -183,6 +183,7 @@ void FetchContext::start()
void FetchContext::processFinished(int exitCode, QProcess::ExitStatus es)
{
Git::Internal::GitClient *client = Git::Internal::GitPlugin::instance()->gitClient();
if (es != QProcess::NormalExit) {
handleError(tr("%1 crashed.").arg(m_git));
return;
......@@ -199,16 +200,22 @@ void FetchContext::processFinished(int exitCode, QProcess::ExitStatus es)
m_progress.setProgressValue(m_progress.progressValue() + 1);
switch (m_fetchMode) {
case FetchDisplay:
m_state = WritePatchFileState;
startWritePatchFile();
if (client->settings()->boolValue(Git::Internal::GitSettings::useDiffEditorKey)) {
client->show(m_repository, QLatin1String("FETCH_HEAD"));
m_progress.reportFinished();
m_state = DoneState;
deleteLater();
} else {
m_state = WritePatchFileState;
startWritePatchFile();
}
break;
case FetchCherryPick:
case FetchCheckout:
if (m_fetchMode == FetchCherryPick) {
cherryPick();
} else {
Git::Internal::GitPlugin::instance()->gitClient()->synchronousCheckout(
m_repository, QLatin1String("FETCH_HEAD"));
client->synchronousCheckout(m_repository, QLatin1String("FETCH_HEAD"));
}
m_progress.reportFinished();
m_state = DoneState;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment