aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/mercurial/clonewizard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/mercurial/clonewizard.cpp')
-rw-r--r--src/plugins/mercurial/clonewizard.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/plugins/mercurial/clonewizard.cpp b/src/plugins/mercurial/clonewizard.cpp
index 90339e34c24..1ac5e63fa58 100644
--- a/src/plugins/mercurial/clonewizard.cpp
+++ b/src/plugins/mercurial/clonewizard.cpp
@@ -50,17 +50,11 @@ namespace Internal {
// --------------------------------------------------------------------
CloneWizard::CloneWizard(const Utils::FileName &path, QWidget *parent) :
- BaseCheckoutWizard(path, parent)
+ BaseCheckoutWizard(Constants::VCS_ID_MERCURIAL, parent)
{
setTitle(tr("Cloning"));
setStartedStatus(tr("Cloning started..."));
- const Core::IVersionControl *vc = MercurialPlugin::instance()->versionControl();
- if (!vc->isConfigured()) {
- auto configPage = new VcsConfigurationPage;
- configPage->setVersionControl(vc);
- addPage(configPage);
- }
auto page = new CloneWizardPage;
page->setPath(path.toString());
addPage(page);
@@ -71,17 +65,12 @@ VcsCommand *CloneWizard::createCommand(Utils::FileName *checkoutDir)
const CloneWizardPage *cwp = find<CloneWizardPage>();
QTC_ASSERT(cwp, return 0);
- const VcsBaseClientSettings &settings = MercurialPlugin::client()->settings();
+ const Utils::FileName path = Utils::FileName::fromString(cwp->path());
+ const QString directory = cwp->directory();
- QString path = cwp->path();
- QString directory = cwp->directory();
+ *checkoutDir = Utils::FileName::fromString(path.toString() + QLatin1Char('/') + directory);
- QStringList args;
- args << QLatin1String("clone") << cwp->repository() << directory;
- *checkoutDir = Utils::FileName::fromString(path + QLatin1Char('/') + directory);
- auto command = new VcsCommand(path, QProcessEnvironment::systemEnvironment());
- command->addJob(settings.binaryPath(), args, -1);
- return command;
+ return createCommandImpl(cwp->repository(), path, directory, QStringList());
}
} // namespace Internal