forked from qt-creator/qt-creator
VCS: Allow remote vcs operations
Both VcsBaseClient::vcsBinary() and VcsBaseClient::processEnvironment() get an additional parameter "FilePath target" to allow selecting binaries and environment based on where the repository is located. This allows to select e.g. a git binary on a remote device, and the environment of the remote device for each VCS operation. A bunch of file path operations are either fixed or ported to actually use FilePath correctly. Change-Id: I6afc645772fde3dff3ec19c13efe538e5888e952 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -914,13 +914,13 @@ void BranchModel::updateUpstreamStatus(BranchNode *node)
|
||||
return;
|
||||
|
||||
Process *process = new Process(node);
|
||||
process->setEnvironment(gitClient().processEnvironment());
|
||||
process->setEnvironment(gitClient().processEnvironment(d->workingDirectory));
|
||||
QStringList parameters = {"rev-list", "--no-color", "--count"};
|
||||
if (node->tracking.isEmpty())
|
||||
parameters += {node->fullRef(), "--not", "--remotes"};
|
||||
else
|
||||
parameters += {"--left-right", node->fullRef() + "..." + node->tracking};
|
||||
process->setCommand({gitClient().vcsBinary(), parameters});
|
||||
process->setCommand({gitClient().vcsBinary(d->workingDirectory), parameters});
|
||||
process->setWorkingDirectory(d->workingDirectory);
|
||||
connect(process, &Process::done, this, [this, process, node] {
|
||||
process->deleteLater();
|
||||
|
||||
Reference in New Issue
Block a user