forked from qt-creator/qt-creator
Gerrit - use new diff editor for diff
Change-Id: I7ba84491a5f6796ff446c2e21487ed4c04441b82 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -202,11 +202,11 @@ void GerritDialog::displayRepositoryPath()
|
|||||||
if (m_repositoryChooser->path().isEmpty())
|
if (m_repositoryChooser->path().isEmpty())
|
||||||
m_repositoryChooser->setPath(m_parameters->repositoryPath);
|
m_repositoryChooser->setPath(m_parameters->repositoryPath);
|
||||||
if (m_parameters->promptPath) {
|
if (m_parameters->promptPath) {
|
||||||
m_displayButton->setText(tr("&Diff..."));
|
m_displayButton->setText(tr("&Show..."));
|
||||||
m_cherryPickButton->setText(tr("Cherry &Pick..."));
|
m_cherryPickButton->setText(tr("Cherry &Pick..."));
|
||||||
m_checkoutButton->setText(tr("&Checkout..."));
|
m_checkoutButton->setText(tr("&Checkout..."));
|
||||||
} else {
|
} else {
|
||||||
m_displayButton->setText(tr("&Diff"));
|
m_displayButton->setText(tr("&Show"));
|
||||||
m_cherryPickButton->setText(tr("Cherry &Pick"));
|
m_cherryPickButton->setText(tr("Cherry &Pick"));
|
||||||
m_checkoutButton->setText(tr("&Checkout"));
|
m_checkoutButton->setText(tr("&Checkout"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -183,6 +183,7 @@ void FetchContext::start()
|
|||||||
|
|
||||||
void FetchContext::processFinished(int exitCode, QProcess::ExitStatus es)
|
void FetchContext::processFinished(int exitCode, QProcess::ExitStatus es)
|
||||||
{
|
{
|
||||||
|
Git::Internal::GitClient *client = Git::Internal::GitPlugin::instance()->gitClient();
|
||||||
if (es != QProcess::NormalExit) {
|
if (es != QProcess::NormalExit) {
|
||||||
handleError(tr("%1 crashed.").arg(m_git));
|
handleError(tr("%1 crashed.").arg(m_git));
|
||||||
return;
|
return;
|
||||||
@@ -199,16 +200,22 @@ void FetchContext::processFinished(int exitCode, QProcess::ExitStatus es)
|
|||||||
m_progress.setProgressValue(m_progress.progressValue() + 1);
|
m_progress.setProgressValue(m_progress.progressValue() + 1);
|
||||||
switch (m_fetchMode) {
|
switch (m_fetchMode) {
|
||||||
case FetchDisplay:
|
case FetchDisplay:
|
||||||
|
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;
|
m_state = WritePatchFileState;
|
||||||
startWritePatchFile();
|
startWritePatchFile();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case FetchCherryPick:
|
case FetchCherryPick:
|
||||||
case FetchCheckout:
|
case FetchCheckout:
|
||||||
if (m_fetchMode == FetchCherryPick) {
|
if (m_fetchMode == FetchCherryPick) {
|
||||||
cherryPick();
|
cherryPick();
|
||||||
} else {
|
} else {
|
||||||
Git::Internal::GitPlugin::instance()->gitClient()->synchronousCheckout(
|
client->synchronousCheckout(m_repository, QLatin1String("FETCH_HEAD"));
|
||||||
m_repository, QLatin1String("FETCH_HEAD"));
|
|
||||||
}
|
}
|
||||||
m_progress.reportFinished();
|
m_progress.reportFinished();
|
||||||
m_state = DoneState;
|
m_state = DoneState;
|
||||||
|
|||||||
Reference in New Issue
Block a user