forked from qt-creator/qt-creator
Subversion: Offer to trust server certificate on import from SVN
Task-number: QTCREATORBUG-3753 Change-Id: I60ae8cbefa494b0b530afed54bd51ce8df23e475 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
|
||||
#include "checkoutwizard.h"
|
||||
#include "checkoutwizardpage.h"
|
||||
#include "subversionconstants.h"
|
||||
#include "subversionplugin.h"
|
||||
#include "subversionclient.h"
|
||||
|
||||
@@ -74,7 +75,11 @@ VcsCommand *CheckoutWizard::createCommand(FileName *checkoutDir)
|
||||
const FileName binary = settings.binaryPath();
|
||||
const QString directory = cwp->directory();
|
||||
QStringList args;
|
||||
args << QLatin1String("checkout") << cwp->repository() << directory;
|
||||
args << QLatin1String("checkout");
|
||||
args << QLatin1String(Constants::NON_INTERACTIVE_OPTION);
|
||||
if (cwp->trustServerCert())
|
||||
args << QLatin1String("--trust-server-cert");
|
||||
args << cwp->repository() << directory;
|
||||
const QString workingDirectory = cwp->path();
|
||||
|
||||
*checkoutDir = FileName::fromString(workingDirectory + QLatin1Char('/') + directory);
|
||||
|
@@ -30,16 +30,26 @@
|
||||
|
||||
#include "checkoutwizardpage.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
|
||||
namespace Subversion {
|
||||
namespace Internal {
|
||||
|
||||
CheckoutWizardPage::CheckoutWizardPage(QWidget *parent) :
|
||||
VcsBase::BaseCheckoutWizardPage(parent)
|
||||
VcsBase::BaseCheckoutWizardPage(parent),
|
||||
m_trustServerCertBox(new QCheckBox(tr("Trust Server Certificate")))
|
||||
{
|
||||
setTitle(tr("Location"));
|
||||
setSubTitle(tr("Specify repository URL, checkout directory and path."));
|
||||
setRepositoryLabel(tr("Repository:"));
|
||||
setBranchSelectorVisible(false);
|
||||
|
||||
addLocalControl(m_trustServerCertBox);
|
||||
}
|
||||
|
||||
bool CheckoutWizardPage::trustServerCert() const
|
||||
{
|
||||
return m_trustServerCertBox->isChecked();
|
||||
}
|
||||
|
||||
QString CheckoutWizardPage::directoryFromRepository(const QString &repoIn) const
|
||||
|
@@ -33,6 +33,10 @@
|
||||
|
||||
#include <vcsbase/basecheckoutwizardpage.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QCheckBox;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Subversion {
|
||||
namespace Internal {
|
||||
|
||||
@@ -41,8 +45,13 @@ class CheckoutWizardPage : public VcsBase::BaseCheckoutWizardPage {
|
||||
public:
|
||||
CheckoutWizardPage(QWidget *parent = 0);
|
||||
|
||||
bool trustServerCert() const;
|
||||
|
||||
protected:
|
||||
QString directoryFromRepository(const QString &r) const;
|
||||
|
||||
private:
|
||||
QCheckBox *m_trustServerCertBox;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
Reference in New Issue
Block a user