Commit 36bec480 authored by Petar Perisin's avatar Petar Perisin
Browse files

Git - execute push asynchronously



Change-Id: I0d5b0eaf562d30f34f01bcf344791a4ce766bdab
Reviewed-by: default avatarOrgad Shaneh <orgads@gmail.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent dd7c2e62
......@@ -350,7 +350,7 @@ void GerritPlugin::push()
target += QLatin1Char('/') + topic;
args << target;
Git::Internal::GitPlugin::instance()->gitClient()->synchronousPush(topLevel, args);
Git::Internal::GitPlugin::instance()->gitClient()->push(topLevel, args);
}
// Open or raise the Gerrit dialog window.
......
......@@ -2981,17 +2981,14 @@ void GitClient::subversionLog(const QString &workingDirectory)
executeGit(workingDirectory, arguments, editor);
}
bool GitClient::synchronousPush(const QString &workingDirectory, const QStringList &pushArgs)
void GitClient::push(const QString &workingDirectory, const QStringList &pushArgs)
{
// Disable UNIX terminals to suppress SSH prompting.
const unsigned flags = VcsBase::VcsBasePlugin::SshPasswordPrompt|VcsBase::VcsBasePlugin::ShowStdOutInLogWindow
|VcsBase::VcsBasePlugin::ShowSuccessMessage;
QStringList arguments(QLatin1String("push"));
if (!pushArgs.isEmpty())
arguments += pushArgs;
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::synchronousMerge(const QString &workingDirectory, const QString &branch)
......
......@@ -240,8 +240,7 @@ public:
QString vcsGetRepositoryURL(const QString &directory);
void fetch(const QString &workingDirectory, const QString &remote);
bool synchronousPull(const QString &workingDirectory, bool rebase);
bool synchronousPush(const QString &workingDirectory,
const QStringList &pushArgs = QStringList());
void push(const QString &workingDirectory, const QStringList &pushArgs = QStringList());
bool synchronousMerge(const QString &workingDirectory, const QString &branch);
bool canRebase(const QString &workingDirectory) const;
bool synchronousRebase(const QString &workingDirectory,
......
......@@ -1103,7 +1103,7 @@ void GitPlugin::push()
{
const VcsBase::VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return);
m_gitClient->synchronousPush(state.topLevel());
m_gitClient->push(state.topLevel());
}
void GitPlugin::startMergeTool()
......
......@@ -172,7 +172,7 @@ void RemoteDialog::pushToRemote()
const int row = indexList.at(0).row();
const QString remoteName = m_remoteModel->remoteName(row);
m_remoteModel->client()->synchronousPush(m_remoteModel->workingDirectory(),
m_remoteModel->client()->push(m_remoteModel->workingDirectory(),
QStringList() << remoteName);
}
......
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