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:
@@ -101,7 +101,7 @@ FetchContext::FetchContext(const std::shared_ptr<GerritChange> &change,
|
||||
VcsBase::VcsOutputWindow::append(QString::fromLocal8Bit(m_process.readAllRawStandardOutput()));
|
||||
});
|
||||
m_process.setWorkingDirectory(repository);
|
||||
m_process.setEnvironment(gitClient().processEnvironment());
|
||||
m_process.setEnvironment(gitClient().processEnvironment(repository));
|
||||
}
|
||||
|
||||
void FetchContext::start()
|
||||
@@ -279,7 +279,7 @@ QString GerritPlugin::branch(const FilePath &repository)
|
||||
void GerritPlugin::fetch(const std::shared_ptr<GerritChange> &change, int mode)
|
||||
{
|
||||
// Locate git.
|
||||
const Utils::FilePath git = gitClient().vcsBinary();
|
||||
const Utils::FilePath git = gitClient().vcsBinary(m_dialog->repositoryPath());
|
||||
if (git.isEmpty()) {
|
||||
VcsBase::VcsOutputWindow::appendError(Git::Tr::tr("Git is not available."));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user