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:
@@ -57,7 +57,7 @@ bool SubversionClient::doCommit(const FilePath &repositoryRoot,
|
||||
const QString &commitMessageFile,
|
||||
const QStringList &extraOptions) const
|
||||
{
|
||||
CommandLine args{vcsBinary()};
|
||||
CommandLine args{vcsBinary(repositoryRoot)};
|
||||
args << vcsCommandString(CommitCommand)
|
||||
<< extraOptions
|
||||
<< AddAuthOptions()
|
||||
@@ -117,7 +117,7 @@ QString SubversionClient::synchronousTopic(const FilePath &repository) const
|
||||
{
|
||||
QStringList args;
|
||||
|
||||
QString svnVersionBinary = vcsBinary().toString();
|
||||
QString svnVersionBinary = vcsBinary(repository).toString();
|
||||
int pos = svnVersionBinary.lastIndexOf('/');
|
||||
if (pos < 0)
|
||||
svnVersionBinary.clear();
|
||||
@@ -237,7 +237,7 @@ SubversionDiffEditorController *SubversionClient::findOrCreateDiffEditor(const Q
|
||||
if (!controller) {
|
||||
controller = new SubversionDiffEditorController(document);
|
||||
controller->setVcsBinary(settings().binaryPath());
|
||||
controller->setProcessEnvironment(processEnvironment());
|
||||
controller->setProcessEnvironment(processEnvironment(workingDirectory));
|
||||
controller->setWorkingDirectory(workingDirectory);
|
||||
}
|
||||
VcsBase::setSource(document, source);
|
||||
|
||||
Reference in New Issue
Block a user