forked from qt-creator/qt-creator
Vcs: Optionally pass binary to run
Change-Id: I33eb1ce7d874bea27979068aca310f607ec7fde8 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -175,6 +175,18 @@ QString VcsBaseClientImpl::stripLastNewline(const QString &in)
|
||||
return in;
|
||||
}
|
||||
|
||||
Utils::SynchronousProcessResponse
|
||||
VcsBaseClientImpl::vcsFullySynchronousExec(const QString &workingDir, const Utils::FileName &binary,
|
||||
const QStringList &args, unsigned flags,
|
||||
int timeoutS, QTextCodec *codec) const
|
||||
{
|
||||
VcsCommand command(workingDir, processEnvironment());
|
||||
command.addFlags(flags);
|
||||
if (codec)
|
||||
command.setCodec(codec);
|
||||
return command.runCommand(binary, args, (timeoutS > 0) ? timeoutS : vcsTimeoutS());
|
||||
}
|
||||
|
||||
void VcsBaseClientImpl::resetCachedVcsInfo(const QString &workingDir)
|
||||
{
|
||||
Core::VcsManager::resetVersionControlForDirectory(workingDir);
|
||||
@@ -197,11 +209,7 @@ Utils::SynchronousProcessResponse
|
||||
VcsBaseClientImpl::vcsFullySynchronousExec(const QString &workingDir, const QStringList &args,
|
||||
unsigned flags, int timeoutS, QTextCodec *codec) const
|
||||
{
|
||||
VcsCommand command(workingDir, processEnvironment());
|
||||
command.addFlags(flags);
|
||||
if (codec)
|
||||
command.setCodec(codec);
|
||||
return command.runCommand(vcsBinary(), args, (timeoutS > 0) ? timeoutS : vcsTimeoutS());
|
||||
return vcsFullySynchronousExec(workingDir, vcsBinary(), args, flags, timeoutS, codec);
|
||||
}
|
||||
|
||||
VcsCommand *VcsBaseClientImpl::vcsExec(const QString &workingDirectory, const QStringList &arguments,
|
||||
|
@@ -103,6 +103,10 @@ public:
|
||||
Utils::SynchronousProcessResponse
|
||||
vcsFullySynchronousExec(const QString &workingDir, const QStringList &args,
|
||||
unsigned flags = 0, int timeoutS = -1, QTextCodec *codec = nullptr) const;
|
||||
Utils::SynchronousProcessResponse
|
||||
vcsFullySynchronousExec(const QString &workingDir, const Utils::FileName &binary, const QStringList &args,
|
||||
unsigned flags = 0, int timeoutS = -1, QTextCodec *codec = nullptr) const;
|
||||
|
||||
|
||||
// Simple helper to execute a single command using createCommand and enqueueJob.
|
||||
VcsCommand *vcsExec(const QString &workingDirectory, const QStringList &arguments,
|
||||
|
Reference in New Issue
Block a user