aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-05-11 16:23:05 +0200
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-05-18 12:43:12 +0000
commit3f6f02f2f1fa24ddf13596d7cf76c7d70c6eccb4 (patch)
tree421307c24f69bd204561da93b7ff9dffb4abf7cc
parentf356aae5f9c435e1d69156d11b709e1ee41909f4 (diff)
Bazaar: Replace CloneWizard with a Json wizard
Change-Id: Ifce4d43a2f8d1ec97af4b30d32e5c8bb03c22bc9 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Hugues Delorme <delorme.hugues@fougsys.fr>
-rw-r--r--share/qtcreator/templates/wizards/projects/vcs/bazaar/icon.png (renamed from src/plugins/bazaar/images/bazaar.png)bin10551 -> 10551 bytes
-rw-r--r--share/qtcreator/templates/wizards/projects/vcs/bazaar/wizard.json198
-rw-r--r--src/plugins/bazaar/bazaar.pro8
-rw-r--r--src/plugins/bazaar/bazaar.qbs8
-rw-r--r--src/plugins/bazaar/bazaar.qrc5
-rw-r--r--src/plugins/bazaar/bazaarplugin.cpp11
-rw-r--r--src/plugins/bazaar/cloneoptionspanel.cpp91
-rw-r--r--src/plugins/bazaar/cloneoptionspanel.h64
-rw-r--r--src/plugins/bazaar/cloneoptionspanel.ui137
-rw-r--r--src/plugins/bazaar/clonewizard.cpp96
-rw-r--r--src/plugins/bazaar/clonewizard.h54
-rw-r--r--src/plugins/bazaar/clonewizardpage.cpp65
-rw-r--r--src/plugins/bazaar/clonewizardpage.h58
13 files changed, 198 insertions, 597 deletions
diff --git a/src/plugins/bazaar/images/bazaar.png b/share/qtcreator/templates/wizards/projects/vcs/bazaar/icon.png
index 19b6a8b29f..19b6a8b29f 100644
--- a/src/plugins/bazaar/images/bazaar.png
+++ b/share/qtcreator/templates/wizards/projects/vcs/bazaar/icon.png
Binary files differ
diff --git a/share/qtcreator/templates/wizards/projects/vcs/bazaar/wizard.json b/share/qtcreator/templates/wizards/projects/vcs/bazaar/wizard.json
new file mode 100644
index 0000000000..86d3ea0363
--- /dev/null
+++ b/share/qtcreator/templates/wizards/projects/vcs/bazaar/wizard.json
@@ -0,0 +1,198 @@
+{
+ "version": 1,
+ "kind": "project",
+ "id": "B.Bazaar",
+ "category": "T.Import",
+ "trDescription": "Clones a Bazaar branch and tries to load the contained project.",
+ "trDisplayName": "Bazaar Clone (Or Branch)",
+ "trDisplayCategory": "Import Project",
+ "icon": "icon.png",
+ "featuresRequired": [ "Plugin.Bazaar" ],
+
+ "options":
+ [
+ { "key": "vcsId", "value": "B.Bazaar" },
+ { "key": "vcsName", "value": "%{JS: Vcs.displayName('%{vcsId}')}" },
+ { "key": "SR", "value": "%{JS: '%{Repo}'.substr('%{Repo}'.indexOf(':') + 1) }" },
+ { "key": "defaultDir", "value": "%{JS: '%{SR}'.substr('%{SR}'.lastIndexOf('/') + 1).replace(/\\./, '-') }"},
+ { "key": "RevArg", "value": "%{JS: '%{Rev}' !== '' ? '-r' : ''}" },
+ { "key": "TargetPath", "value": "%{Path}/%{Dir}" }
+ ],
+
+ "pages":
+ [
+ {
+ "trDisplayName": "Configuration",
+ "trShortTitle": "Configuration",
+ "trSubTitle": "Please configure <b>%{vcsName}</b> now.",
+ "typeId": "VcsConfiguration",
+ "enabled": "%{JS: !Vcs.isConfigured('%{vcsId}')}",
+ "data": { "vcsId": "%{vcsId}" }
+ },
+ {
+ "trDisplayName": "Location",
+ "trShortTitle": "Location",
+ "trSubTitle": "Specify repository URL, checkout directory, and path.",
+ "typeId": "Fields",
+ "data" :
+ [
+ {
+ "name": "Repo",
+ "trDisplayName": "Repository:",
+ "mandatory": true,
+ "type": "LineEdit"
+ },
+ {
+ "name": "Sp1",
+ "type": "Spacer",
+ "data": { "factor": 2 }
+ },
+ {
+ "name": "Path",
+ "trDisplayName": "Path:",
+ "type": "PathChooser",
+ "data":
+ {
+ "kind": "existingDirectory",
+ "basePath": "%{InitialPath}",
+ "path": "%{InitialPath}"
+ }
+ },
+ {
+ "name": "Dir",
+ "trDisplayName": "Directory:",
+ "mandatory": true,
+ "type": "LineEdit",
+ "isComplete": "%{JS: '%{UseExisting}' !== '' || '%{Dir}' === '' || !Util.exists('%{TargetPath}')}",
+ "trIncompleteMessage": "\"%{JS: Util.toNativeSeparators('%{TargetPath}')}\" exists in the filesystem.",
+ "data":
+ {
+ "trText": "%{defaultDir}"
+ }
+ },
+ {
+ "name": "Sp2",
+ "type": "Spacer",
+ "data": { "factor": 2 }
+ },
+ {
+ "name": "UseExisting",
+ "trDisplayName": "Use existing directory",
+ "trToolTip": "Proceed with cloning the repository, even if the target directory already exists.",
+ "type": "CheckBox",
+ "data":
+ {
+ "checkedValue": "--use-existing-dir",
+ "uncheckedValue": ""
+ }
+ },
+ {
+ "name": "Stacked",
+ "trDisplayName": "Stacked",
+ "trToolTip": "Make the new branch depend on the availability of the source branch.",
+ "type": "CheckBox",
+ "data":
+ {
+ "checkedValue": "--stacked",
+ "uncheckedValue": ""
+ }
+ },
+ {
+ "name": "Standalone",
+ "trDisplayName": "Standalone",
+ "trToolTip": "Do not use a shared repository.",
+ "type": "CheckBox",
+ "data":
+ {
+ "checkedValue": "--standalone",
+ "uncheckedValue": ""
+ }
+ },
+ {
+ "name": "Bind",
+ "trDisplayName": "Bind new branch to source location",
+ "trToolTip": "Bind the new branch to the source location.",
+ "type": "CheckBox",
+ "data":
+ {
+ "checkedValue": "--bind",
+ "uncheckedValue": ""
+ }
+ },
+ {
+ "name": "Switch",
+ "trDisplayName": "Switch checkout",
+ "trToolTip": "Switch the checkout in the current directory to the new branch.",
+ "type": "CheckBox",
+ "data":
+ {
+ "checkedValue": "--switch",
+ "uncheckedValue": ""
+ }
+ },
+ {
+ "name": "Hardlink",
+ "trDisplayName": "Hardlink",
+ "trToolTip": "Use hard-links in working tree.",
+ "type": "CheckBox",
+ "data":
+ {
+ "checkedValue": "--hardlink",
+ "uncheckedValue": ""
+ }
+ },
+ {
+ "name": "NoTree",
+ "trDisplayName": "No working-tree",
+ "trToolTip": "Do not create a working tree.",
+ "type": "CheckBox",
+ "data":
+ {
+ "checkedValue": "--no-tree",
+ "uncheckedValue": ""
+ }
+ },
+ {
+ "name": "Rev",
+ "trDisplayName": "Revision:",
+ "mandatory": false,
+ "type": "LineEdit"
+ }
+ ]
+ },
+ {
+ "trDisplayName": "Clone",
+ "trShortTitle": "Clone",
+ "typeId": "VcsCommand",
+ "data" :
+ {
+ "vcsId": "%{vcsId}",
+ "trRunMessage": "Running Bazaar branch...",
+ "repository": "%{Repo}",
+ "baseDirectory": "%{Path}",
+ "checkoutName": "%{Dir}",
+ "extraArguments":
+ [
+ "%{UseExisting}",
+ "%{Stacked}",
+ "%{Standalone}",
+ "%{Bind}",
+ "%{Switch}",
+ "%{Hardlink}",
+ "%{NoTree}",
+ "%{RevArg}", "%{Rev}"
+ ]
+ }
+ }
+ ],
+
+ "generators":
+ [
+ {
+ "typeId": "Scanner",
+ "data": {
+ "subdirectoryPatterns": [ "^src$" ]
+ }
+ }
+ ]
+}
diff --git a/src/plugins/bazaar/bazaar.pro b/src/plugins/bazaar/bazaar.pro
index f3a266221b..cbb7f4429b 100644
--- a/src/plugins/bazaar/bazaar.pro
+++ b/src/plugins/bazaar/bazaar.pro
@@ -11,9 +11,6 @@ SOURCES += \
annotationhighlighter.cpp \
pullorpushdialog.cpp \
branchinfo.cpp \
- clonewizardpage.cpp \
- clonewizard.cpp \
- cloneoptionspanel.cpp \
uncommitdialog.cpp
HEADERS += \
bazaarclient.h \
@@ -28,15 +25,10 @@ HEADERS += \
annotationhighlighter.h \
pullorpushdialog.h \
branchinfo.h \
- clonewizard.h \
- clonewizardpage.h \
- cloneoptionspanel.h \
uncommitdialog.h
FORMS += \
optionspage.ui \
revertdialog.ui \
bazaarcommitpanel.ui \
pullorpushdialog.ui \
- cloneoptionspanel.ui \
uncommitdialog.ui
-RESOURCES += bazaar.qrc
diff --git a/src/plugins/bazaar/bazaar.qbs b/src/plugins/bazaar/bazaar.qbs
index 45a59be37c..b6fdd6bcb6 100644
--- a/src/plugins/bazaar/bazaar.qbs
+++ b/src/plugins/bazaar/bazaar.qbs
@@ -13,7 +13,6 @@ QtcPlugin {
files: [
"annotationhighlighter.cpp",
"annotationhighlighter.h",
- "bazaar.qrc",
"bazaarclient.cpp",
"bazaarclient.h",
"bazaarcommitpanel.ui",
@@ -29,13 +28,6 @@ QtcPlugin {
"bazaarsettings.h",
"branchinfo.cpp",
"branchinfo.h",
- "cloneoptionspanel.cpp",
- "cloneoptionspanel.h",
- "cloneoptionspanel.ui",
- "clonewizard.cpp",
- "clonewizard.h",
- "clonewizardpage.cpp",
- "clonewizardpage.h",
"commiteditor.cpp",
"commiteditor.h",
"constants.h",
diff --git a/src/plugins/bazaar/bazaar.qrc b/src/plugins/bazaar/bazaar.qrc
deleted file mode 100644
index a10bfb3194..0000000000
--- a/src/plugins/bazaar/bazaar.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/bazaar" >
- <file>images/bazaar.png</file>
- </qresource>
-</RCC>
diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp
index 65280ec98c..a41ce6856a 100644
--- a/src/plugins/bazaar/bazaarplugin.cpp
+++ b/src/plugins/bazaar/bazaarplugin.cpp
@@ -38,7 +38,6 @@
#include "pullorpushdialog.h"
#include "uncommitdialog.h"
#include "commiteditor.h"
-#include "clonewizard.h"
#include "ui_revertdialog.h"
@@ -181,16 +180,6 @@ bool BazaarPlugin::initialize(const QStringList &arguments, QString *errorMessag
addAutoReleasedObject(new VcsSubmitEditorFactory(&submitEditorParameters,
[]() { return new CommitEditor(&submitEditorParameters); }));
- auto cloneWizardFactory = new BaseCheckoutWizardFactory;
- cloneWizardFactory->setId(QLatin1String(VcsBase::Constants::VCS_ID_BAZAAR));
- cloneWizardFactory->setIcon(QIcon(QLatin1String(":/bazaar/images/bazaar.png")));
- cloneWizardFactory->setDescription(tr("Clones a Bazaar branch and tries to load the contained project."));
- cloneWizardFactory->setDisplayName(tr("Bazaar Clone (Or Branch)"));
- cloneWizardFactory->setWizardCreator([this] (const FileName &path, QWidget *parent) {
- return new CloneWizard(path, parent);
- });
- addAutoReleasedObject(cloneWizardFactory);
-
const QString prefix = QLatin1String("bzr");
m_commandLocator = new CommandLocator("Bazaar", prefix, prefix);
addAutoReleasedObject(m_commandLocator);
diff --git a/src/plugins/bazaar/cloneoptionspanel.cpp b/src/plugins/bazaar/cloneoptionspanel.cpp
deleted file mode 100644
index 98a7b35afd..0000000000
--- a/src/plugins/bazaar/cloneoptionspanel.cpp
+++ /dev/null
@@ -1,91 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 Hugues Delorme
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-#include "cloneoptionspanel.h"
-#include "ui_cloneoptionspanel.h"
-
-#include <QDebug>
-
-namespace Bazaar {
-namespace Internal {
-
-CloneOptionsPanel::CloneOptionsPanel(QWidget *parent)
- : QWidget(parent),
- m_ui(new Ui::CloneOptionsPanel)
-{
- m_ui->setupUi(this);
-}
-
-CloneOptionsPanel::~CloneOptionsPanel()
-{
- delete m_ui;
-}
-
-bool CloneOptionsPanel::isUseExistingDirectoryOptionEnabled() const
-{
- return m_ui->useExistingDirCheckBox->isChecked();
-}
-
-bool CloneOptionsPanel::isStackedOptionEnabled() const
-{
- return m_ui->stackedCheckBox->isChecked();
-}
-
-bool CloneOptionsPanel::isStandAloneOptionEnabled() const
-{
- return m_ui->standAloneCheckBox->isChecked();
-}
-
-bool CloneOptionsPanel::isBindOptionEnabled() const
-{
- return m_ui->bindCheckBox->isChecked();
-}
-
-bool CloneOptionsPanel::isSwitchOptionEnabled() const
-{
- return m_ui->switchCheckBox->isChecked();
-}
-
-bool CloneOptionsPanel::isHardLinkOptionEnabled() const
-{
- return m_ui->hardlinkCheckBox->isChecked();
-}
-
-bool CloneOptionsPanel::isNoTreeOptionEnabled() const
-{
- return m_ui->noTreeCheckBox->isChecked();
-}
-
-QString CloneOptionsPanel::revision() const
-{
- return m_ui->revisionLineEdit->text().simplified();
-}
-
-} // namespace Internal
-} // namespace Bazaar
diff --git a/src/plugins/bazaar/cloneoptionspanel.h b/src/plugins/bazaar/cloneoptionspanel.h
deleted file mode 100644
index b19faacb28..0000000000
--- a/src/plugins/bazaar/cloneoptionspanel.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 Hugues Delorme
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-#ifndef CLONEOPTIONSPANEL_H
-#define CLONEOPTIONSPANEL_H
-
-#include <QWidget>
-
-namespace Bazaar {
-namespace Internal {
-
-namespace Ui { class CloneOptionsPanel; }
-
-class CloneOptionsPanel : public QWidget
-{
- Q_OBJECT
-
-public:
- CloneOptionsPanel(QWidget *parent = 0);
- ~CloneOptionsPanel();
-
- bool isUseExistingDirectoryOptionEnabled() const;
- bool isStackedOptionEnabled() const;
- bool isStandAloneOptionEnabled() const;
- bool isBindOptionEnabled() const;
- bool isSwitchOptionEnabled() const;
- bool isHardLinkOptionEnabled() const;
- bool isNoTreeOptionEnabled() const;
- QString revision() const;
-
-private:
- Ui::CloneOptionsPanel *m_ui;
-};
-
-} // namespace Internal
-} // namespace Bazaar
-
-#endif // CLONEOPTIONSPANEL_H
diff --git a/src/plugins/bazaar/cloneoptionspanel.ui b/src/plugins/bazaar/cloneoptionspanel.ui
deleted file mode 100644
index 4a9e6ea712..0000000000
--- a/src/plugins/bazaar/cloneoptionspanel.ui
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>Bazaar::Internal::CloneOptionsPanel</class>
- <widget class="QWidget" name="Bazaar::Internal::CloneOptionsPanel">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>283</width>
- <height>278</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string notr="true"/>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QGroupBox" name="optionsGroupBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Options</string>
- </property>
- <property name="flat">
- <bool>true</bool>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0" colspan="2">
- <widget class="QCheckBox" name="useExistingDirCheckBox">
- <property name="toolTip">
- <string>By default, branch will fail if the target directory exists, but does not already have a control directory.
-This flag will allow branch to proceed.</string>
- </property>
- <property name="text">
- <string>Use existing directory</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" colspan="2">
- <widget class="QCheckBox" name="stackedCheckBox">
- <property name="toolTip">
- <string>Creates a stacked branch referring to the source branch.
-The new branch will depend on the availability of the source branch for all operations.</string>
- </property>
- <property name="text">
- <string>Stacked</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0" colspan="2">
- <widget class="QCheckBox" name="standAloneCheckBox">
- <property name="toolTip">
- <string>Does not use a shared repository, even if available.</string>
- </property>
- <property name="text">
- <string>Standalone</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0" colspan="2">
- <widget class="QCheckBox" name="bindCheckBox">
- <property name="text">
- <string>Bind new branch to source location</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0" colspan="2">
- <widget class="QCheckBox" name="switchCheckBox">
- <property name="toolTip">
- <string>Switches the checkout in the current directory to the new branch.</string>
- </property>
- <property name="text">
- <string>Switch checkout</string>
- </property>
- </widget>
- </item>
- <item row="5" column="0" colspan="2">
- <widget class="QCheckBox" name="hardlinkCheckBox">
- <property name="toolTip">
- <string>Hard-links working tree files where possible.</string>
- </property>
- <property name="text">
- <string>Hardlink</string>
- </property>
- </widget>
- </item>
- <item row="6" column="0" colspan="2">
- <widget class="QCheckBox" name="noTreeCheckBox">
- <property name="toolTip">
- <string>Creates a branch without a working-tree.</string>
- </property>
- <property name="text">
- <string>No working-tree</string>
- </property>
- </widget>
- </item>
- <item row="7" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Revision:</string>
- </property>
- </widget>
- </item>
- <item row="7" column="1">
- <widget class="QLineEdit" name="revisionLineEdit"/>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>4</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/plugins/bazaar/clonewizard.cpp b/src/plugins/bazaar/clonewizard.cpp
deleted file mode 100644
index 06092e989f..0000000000
--- a/src/plugins/bazaar/clonewizard.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 Hugues Delorme
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "clonewizard.h"
-#include "clonewizardpage.h"
-#include "cloneoptionspanel.h"
-#include "bazaarplugin.h"
-#include "bazaarclient.h"
-#include "bazaarsettings.h"
-
-#include <coreplugin/iversioncontrol.h>
-#include <vcsbase/vcscommand.h>
-#include <vcsbase/vcsbaseconstants.h>
-#include <vcsbase/wizard/vcsconfigurationpage.h>
-
-#include <utils/qtcassert.h>
-
-using namespace VcsBase;
-
-namespace Bazaar {
-namespace Internal {
-
-// --------------------------------------------------------------------
-// CloneWizard:
-// --------------------------------------------------------------------
-
-CloneWizard::CloneWizard(const Utils::FileName &path, QWidget *parent) :
- BaseCheckoutWizard(Constants::VCS_ID_BAZAAR, parent)
-{
- setTitle(tr("Cloning"));
- setStartedStatus(tr("Cloning started..."));
-
- auto page = new CloneWizardPage;
- page->setPath(path.toString());
- addPage(page);
-}
-
-VcsCommand *CloneWizard::createCommand(Utils::FileName *checkoutDir)
-{
- const CloneWizardPage *cwp = find<CloneWizardPage>();
- QTC_ASSERT(cwp, return 0);
-
- *checkoutDir = Utils::FileName::fromString(cwp->path() + QLatin1Char('/') + cwp->directory());
-
- const CloneOptionsPanel *panel = cwp->cloneOptionsPanel();
- QStringList extraOptions;
- if (panel->isUseExistingDirectoryOptionEnabled())
- extraOptions += QLatin1String("--use-existing-dir");
- if (panel->isStackedOptionEnabled())
- extraOptions += QLatin1String("--stacked");
- if (panel->isStandAloneOptionEnabled())
- extraOptions += QLatin1String("--standalone");
- if (panel->isBindOptionEnabled())
- extraOptions += QLatin1String("--bind");
- if (panel->isSwitchOptionEnabled())
- extraOptions += QLatin1String("--switch");
- if (panel->isHardLinkOptionEnabled())
- extraOptions += QLatin1String("--hardlink");
- if (panel->isNoTreeOptionEnabled())
- extraOptions += QLatin1String("--no-tree");
- if (!panel->revision().isEmpty())
- extraOptions << QLatin1String("-r") << panel->revision();
-
- return createCommandImpl(cwp->repository(), Utils::FileName::fromString(cwp->path()),
- cwp->directory(), extraOptions);
-}
-
-} // namespace Internal
-} // namespace Bazaar
diff --git a/src/plugins/bazaar/clonewizard.h b/src/plugins/bazaar/clonewizard.h
deleted file mode 100644
index db85db689a..0000000000
--- a/src/plugins/bazaar/clonewizard.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 Hugues Delorme
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef CLONEWIZARD_H
-#define CLONEWIZARD_H
-
-#include <vcsbase/basecheckoutwizardfactory.h>
-#include <vcsbase/basecheckoutwizard.h>
-
-namespace Bazaar {
-namespace Internal {
-
-class CloneWizard : public VcsBase::BaseCheckoutWizard
-{
- Q_OBJECT
-
-public:
- CloneWizard(const Utils::FileName &path, QWidget *parent = 0);
-
-protected:
- VcsBase::VcsCommand *createCommand(Utils::FileName *checkoutDir);
-};
-
-} // namespace Internal
-} // namespace Bazaar
-
-#endif // CLONEWIZARD_H
diff --git a/src/plugins/bazaar/clonewizardpage.cpp b/src/plugins/bazaar/clonewizardpage.cpp
deleted file mode 100644
index febad62cc9..0000000000
--- a/src/plugins/bazaar/clonewizardpage.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 Hugues Delorme
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#include "clonewizardpage.h"
-#include "cloneoptionspanel.h"
-
-using namespace Bazaar::Internal;
-
-CloneWizardPage::CloneWizardPage(QWidget *parent)
- : VcsBase::BaseCheckoutWizardPage(parent),
- m_optionsPanel(new CloneOptionsPanel)
-{
- setTitle(tr("Location"));
- setSubTitle(tr("Specify repository URL, clone directory and path."));
- setRepositoryLabel(tr("Clone URL:"));
- setBranchSelectorVisible(false);
- addLocalControl(m_optionsPanel);
-}
-
-const CloneOptionsPanel *CloneWizardPage::cloneOptionsPanel() const
-{
- return m_optionsPanel;
-}
-
-QString CloneWizardPage::directoryFromRepository(const QString &repository) const
-{
- // Bazaar repositories are generally of the form
- // 'lp:project' or 'protocol://repositoryUrl/repository/'
- // We are just looking for repository.
- QString repo = repository.trimmed();
- if (repo.startsWith(QLatin1String("lp:")))
- return repo.mid(3);
- const QChar slash = QLatin1Char('/');
- if (repo.endsWith(slash))
- repo.truncate(repo.size() - 1);
- // Take the basename or the repository url
- return repo.mid(repo.lastIndexOf(slash) + 1);
-}
diff --git a/src/plugins/bazaar/clonewizardpage.h b/src/plugins/bazaar/clonewizardpage.h
deleted file mode 100644
index d7336d775b..0000000000
--- a/src/plugins/bazaar/clonewizardpage.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**************************************************************************
-**
-** Copyright (C) 2015 Hugues Delorme
-** Contact: http://www.qt.io/licensing
-**
-** This file is part of Qt Creator.
-**
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms and
-** conditions see http://www.qt.io/terms-conditions. For further information
-** use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-****************************************************************************/
-
-#ifndef CLONEWIZARDPAGE_H
-#define CLONEWIZARDPAGE_H
-
-#include <vcsbase/basecheckoutwizardpage.h>
-
-namespace Bazaar {
-namespace Internal {
-class CloneOptionsPanel;
-
-class CloneWizardPage : public VcsBase::BaseCheckoutWizardPage
-{
- Q_OBJECT
-
-public:
- CloneWizardPage(QWidget *parent = 0);
- const CloneOptionsPanel *cloneOptionsPanel() const;
-
-protected:
- QString directoryFromRepository(const QString &repository) const;
-
-private:
- CloneOptionsPanel *m_optionsPanel;
-};
-
-} // namespace Internal
-} // namespace Bazaar
-
-#endif // CLONEWIZARDPAGE_H