forked from qt-creator/qt-creator
Git - execute fetch asynchronously
Change-Id: Ic2243adaa36444099f834676186331927f3f4588 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -2839,16 +2839,13 @@ void GitClient::revert(const QStringList &files, bool revertStaging)
|
||||
}
|
||||
}
|
||||
|
||||
bool GitClient::synchronousFetch(const QString &workingDirectory, const QString &remote)
|
||||
void GitClient::fetch(const QString &workingDirectory, const QString &remote)
|
||||
{
|
||||
QStringList arguments(QLatin1String("fetch"));
|
||||
arguments << (remote.isEmpty() ? QLatin1String("--all") : remote);
|
||||
|
||||
// Disable UNIX terminals to suppress SSH prompting.
|
||||
const unsigned flags = VcsBase::VcsBasePlugin::SshPasswordPrompt|VcsBase::VcsBasePlugin::ShowStdOutInLogWindow
|
||||
|VcsBase::VcsBasePlugin::ShowSuccessMessage;
|
||||
const Utils::SynchronousProcessResponse resp = synchronousGit(workingDirectory, arguments, flags);
|
||||
return resp.result == Utils::SynchronousProcessResponse::Finished;
|
||||
VcsBase::Command *cmd = executeGit(workingDirectory, arguments, 0, true);
|
||||
connectRepositoryChanged(workingDirectory, cmd);
|
||||
}
|
||||
|
||||
bool GitClient::executeAndHandleConflicts(const QString &workingDirectory,
|
||||
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
|
||||
bool cloneRepository(const QString &directory, const QByteArray &url);
|
||||
QString vcsGetRepositoryURL(const QString &directory);
|
||||
bool synchronousFetch(const QString &workingDirectory, const QString &remote);
|
||||
void fetch(const QString &workingDirectory, const QString &remote);
|
||||
bool synchronousPull(const QString &workingDirectory, bool rebase);
|
||||
bool synchronousPush(const QString &workingDirectory,
|
||||
const QStringList &pushArgs = QStringList());
|
||||
|
||||
@@ -1075,7 +1075,7 @@ bool GitPlugin::submitEditorAboutToClose()
|
||||
|
||||
void GitPlugin::fetch()
|
||||
{
|
||||
m_gitClient->synchronousFetch(currentState().topLevel(), QString());
|
||||
m_gitClient->fetch(currentState().topLevel(), QString());
|
||||
}
|
||||
|
||||
void GitPlugin::pull()
|
||||
|
||||
@@ -184,7 +184,7 @@ void RemoteDialog::fetchFromRemote()
|
||||
|
||||
int row = indexList.at(0).row();
|
||||
const QString remoteName = m_remoteModel->remoteName(row);
|
||||
m_remoteModel->client()->synchronousFetch(m_remoteModel->workingDirectory(), remoteName);
|
||||
m_remoteModel->client()->fetch(m_remoteModel->workingDirectory(), remoteName);
|
||||
}
|
||||
|
||||
void RemoteDialog::updateButtonState()
|
||||
|
||||
Reference in New Issue
Block a user