2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
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>
|
|
|
|
|
|
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
|
|
|
|
2021-07-30 16:46:27 +02:00
|
|
|
bool doCommit(const Utils::FilePath &repositoryRoot,
|
2019-01-16 23:45:22 +02:00
|
|
|
const QStringList &files,
|
|
|
|
|
const QString &commitMessageFile,
|
2021-07-30 16:46:27 +02:00
|
|
|
const QStringList &extraOptions = {}) const;
|
|
|
|
|
void commit(const Utils::FilePath &repositoryRoot,
|
2014-05-19 18:40:37 +02:00
|
|
|
const QStringList &files,
|
|
|
|
|
const QString &commitMessageFile,
|
2021-07-30 16:46:27 +02:00
|
|
|
const QStringList &extraOptions = {}) override;
|
2014-05-19 18:40:37 +02:00
|
|
|
|
2021-07-30 16:46:27 +02:00
|
|
|
void diff(const Utils::FilePath &workingDirectory,
|
|
|
|
|
const QStringList &files,
|
2015-08-20 13:27:00 +02:00
|
|
|
const QStringList &extraOptions) override;
|
2015-01-26 15:29:09 +01:00
|
|
|
|
2021-07-30 16:46:27 +02:00
|
|
|
void log(const Utils::FilePath &workingDir,
|
|
|
|
|
const QStringList &files = {},
|
|
|
|
|
const QStringList &extraOptions = {},
|
2015-06-03 15:33:51 +02:00
|
|
|
bool enableAnnotationContextMenu = false) override;
|
2015-01-26 15:29:09 +01:00
|
|
|
|
2021-07-30 16:46:27 +02:00
|
|
|
void describe(const Utils::FilePath &workingDirectory, int changeNumber, const QString &title);
|
2013-09-27 15:39:16 +02:00
|
|
|
|
|
|
|
|
// Add authorization options to the command line arguments.
|
2021-03-18 18:23:21 +01:00
|
|
|
static QStringList addAuthenticationOptions(const SubversionSettings &settings);
|
2013-09-27 15:39:16 +02:00
|
|
|
|
2021-07-30 16:46:27 +02:00
|
|
|
QString synchronousTopic(const Utils::FilePath &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:
|
2020-06-26 13:59:38 +02:00
|
|
|
Utils::Id vcsEditorKind(VcsCommandTag cmd) const override;
|
2014-11-06 13:23:40 +01:00
|
|
|
|
2013-09-27 15:39:16 +02:00
|
|
|
private:
|
2022-12-15 14:39:02 +01:00
|
|
|
SubversionDiffEditorController *findOrCreateDiffEditor(const QString &documentId,
|
|
|
|
|
const QString &source, const QString &title, const Utils::FilePath &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
|