forked from qt-creator/qt-creator
IVersionControl: Add method to get a ShellCommand for initial checkouts
Change-Id: Iabc056dad186d788003b221afb34303c37fef728 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -29,8 +29,11 @@
|
||||
****************************************************************************/
|
||||
#include "bazaarcontrol.h"
|
||||
#include "bazaarclient.h"
|
||||
#include "bazaarplugin.h"
|
||||
|
||||
#include <vcsbase/vcsbaseclientsettings.h>
|
||||
#include <vcsbase/vcsbaseconstants.h>
|
||||
#include <vcsbase/vcscommand.h>
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
|
||||
@@ -88,6 +91,7 @@ bool BazaarControl::supportsOperation(Operation operation) const
|
||||
case Core::IVersionControl::MoveOperation:
|
||||
case Core::IVersionControl::CreateRepositoryOperation:
|
||||
case Core::IVersionControl::AnnotateOperation:
|
||||
case Core::IVersionControl::InitialCheckoutOperation:
|
||||
break;
|
||||
case Core::IVersionControl::SnapshotOperations:
|
||||
supported = false;
|
||||
@@ -135,6 +139,21 @@ bool BazaarControl::vcsAnnotate(const QString &file, int line)
|
||||
return true;
|
||||
}
|
||||
|
||||
Core::ShellCommand *BazaarControl::createInitialCheckoutCommand(const QString &url,
|
||||
const Utils::FileName &baseDirectory,
|
||||
const QString &localName,
|
||||
const QStringList &extraArgs)
|
||||
{
|
||||
QStringList args;
|
||||
args << m_bazaarClient->vcsCommandString(BazaarClient::CloneCommand)
|
||||
<< extraArgs << url << localName;
|
||||
|
||||
auto command = new VcsBase::VcsCommand(baseDirectory.toString(),
|
||||
m_bazaarClient->processEnvironment());
|
||||
command->addJob(m_bazaarClient->vcsBinary(), args, -1);
|
||||
return command;
|
||||
}
|
||||
|
||||
void BazaarControl::changed(const QVariant &v)
|
||||
{
|
||||
switch (v.type()) {
|
||||
|
||||
Reference in New Issue
Block a user