2013-09-27 15:39:16 +02:00
|
|
|
/****************************************************************************
|
|
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2013-09-27 15:39:16 +02:00
|
|
|
**
|
|
|
|
|
** 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
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2013-09-27 15:39:16 +02:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2013-09-27 15:39:16 +02:00
|
|
|
**
|
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2013-09-27 15:39:16 +02:00
|
|
|
|
|
|
|
|
#include <vcsbase/vcsbaseclient.h>
|
|
|
|
|
|
2014-07-15 23:32:11 +03:00
|
|
|
#include <utils/fileutils.h>
|
|
|
|
|
|
2017-09-27 10:14:56 +02:00
|
|
|
namespace VcsBase { class VcsCommand; }
|
|
|
|
|
|
2013-09-27 15:39:16 +02:00
|
|
|
namespace Subversion {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2017-06-30 14:50:28 +02:00
|
|
|
class SubversionDiffEditorController;
|
2020-01-24 10:13:02 +01:00
|
|
|
class SubversionSettings;
|
2013-09-27 15:39:16 +02:00
|
|
|
|
|
|
|
|
class SubversionClient : public VcsBase::VcsBaseClient
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2020-01-24 10:13:02 +01:00
|
|
|
SubversionClient(SubversionSettings *settings);
|
2014-05-19 18:40:37 +02:00
|
|
|
|
2019-01-16 23:45:22 +02:00
|
|
|
bool doCommit(const QString &repositoryRoot,
|
|
|
|
|
const QStringList &files,
|
|
|
|
|
const QString &commitMessageFile,
|
|
|
|
|
const QStringList &extraOptions = QStringList()) const;
|
2014-05-19 18:40:37 +02:00
|
|
|
void commit(const QString &repositoryRoot,
|
|
|
|
|
const QStringList &files,
|
|
|
|
|
const QString &commitMessageFile,
|
2015-08-20 13:27:00 +02:00
|
|
|
const QStringList &extraOptions = QStringList()) override;
|
2014-05-19 18:40:37 +02:00
|
|
|
|
2015-01-06 15:46:58 +01:00
|
|
|
void diff(const QString &workingDirectory, const QStringList &files,
|
2015-08-20 13:27:00 +02:00
|
|
|
const QStringList &extraOptions) override;
|
2015-01-26 15:29:09 +01:00
|
|
|
|
|
|
|
|
void log(const QString &workingDir,
|
|
|
|
|
const QStringList &files = QStringList(),
|
|
|
|
|
const QStringList &extraOptions = QStringList(),
|
2015-06-03 15:33:51 +02:00
|
|
|
bool enableAnnotationContextMenu = false) override;
|
2015-01-26 15:29:09 +01:00
|
|
|
|
2014-11-06 13:23:40 +01:00
|
|
|
void describe(const QString &workingDirectory, int changeNumber, const QString &title);
|
2013-09-27 15:39:16 +02:00
|
|
|
|
|
|
|
|
// Add authorization options to the command line arguments.
|
2020-01-29 08:03:06 +01:00
|
|
|
static QStringList addAuthenticationOptions(const VcsBase::VcsBaseClientSettings &settings);
|
2013-09-27 15:39:16 +02:00
|
|
|
|
2020-01-30 12:31:47 +01:00
|
|
|
QString synchronousTopic(const QString &repository) const;
|
2014-11-04 16:35:14 +01:00
|
|
|
|
2016-11-07 09:12:42 +01:00
|
|
|
static QString escapeFile(const QString &file);
|
|
|
|
|
static QStringList escapeFiles(const QStringList &files);
|
|
|
|
|
|
2013-09-27 15:39:16 +02:00
|
|
|
protected:
|
2015-08-20 13:27:00 +02:00
|
|
|
Core::Id vcsEditorKind(VcsCommandTag cmd) const override;
|
2014-11-06 13:23:40 +01:00
|
|
|
|
2013-09-27 15:39:16 +02:00
|
|
|
private:
|
2017-06-30 14:50:28 +02:00
|
|
|
SubversionDiffEditorController *findOrCreateDiffEditor(const QString &documentId, const QString &source,
|
2020-01-30 17:02:30 +01:00
|
|
|
const QString &title, const QString &workingDirectory);
|
2014-11-06 13:23:40 +01:00
|
|
|
|
2019-05-28 13:49:26 +02:00
|
|
|
mutable Utils::FilePath m_svnVersionBinary;
|
2014-11-06 13:23:40 +01:00
|
|
|
mutable QString m_svnVersion;
|
2013-09-27 15:39:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Subversion
|