forked from qt-creator/qt-creator
Git - execute push asynchronously
Change-Id: I0d5b0eaf562d30f34f01bcf344791a4ce766bdab Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user