2011-02-28 13:40:06 +01:00
|
|
|
/**************************************************************************
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
|
|
|
|
** Copyright (c) 2010 Hugues Delorme
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** Contact: Nokia Corporation (info@qt.nokia.com)
|
2011-02-28 13:40:06 +01:00
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** This file may be used under the terms of the GNU Lesser General Public
|
|
|
|
|
** License version 2.1 as published by the Free Software Foundation and
|
|
|
|
|
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
|
|
|
** Please review the following information to ensure the GNU Lesser General
|
|
|
|
|
** Public License version 2.1 requirements will be met:
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2011-02-28 13:40:06 +01:00
|
|
|
**
|
|
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
2011-04-13 08:42:33 +02:00
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
2011-02-28 13:40:06 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** Other Usage
|
|
|
|
|
**
|
|
|
|
|
** Alternatively, this file may be used in accordance with the terms and
|
|
|
|
|
** conditions contained in a signed written agreement between you and Nokia.
|
|
|
|
|
**
|
2011-02-28 13:40:06 +01:00
|
|
|
** If you have questions regarding the use of this file, please contact
|
2011-05-06 15:05:37 +02:00
|
|
|
** Nokia at info@qt.nokia.com.
|
2011-02-28 13:40:06 +01:00
|
|
|
**
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef BAZAARCLIENT_H
|
|
|
|
|
#define BAZAARCLIENT_H
|
|
|
|
|
|
2011-06-10 14:02:46 +00:00
|
|
|
#include "bazaarsettings.h"
|
2011-02-28 13:40:06 +01:00
|
|
|
#include "branchinfo.h"
|
|
|
|
|
#include <vcsbase/vcsbaseclient.h>
|
|
|
|
|
|
|
|
|
|
namespace Bazaar {
|
|
|
|
|
namespace Internal {
|
2011-03-28 11:59:26 +02:00
|
|
|
struct BazaarDiffParameters;
|
2011-02-28 13:40:06 +01:00
|
|
|
|
2011-06-10 14:02:46 +00:00
|
|
|
class BazaarSettings;
|
|
|
|
|
|
2011-02-28 13:40:06 +01:00
|
|
|
class BazaarClient : public VCSBase::VCSBaseClient
|
|
|
|
|
{
|
2011-03-28 11:59:26 +02:00
|
|
|
Q_OBJECT
|
2011-02-28 13:40:06 +01:00
|
|
|
public:
|
2011-06-10 14:02:46 +00:00
|
|
|
BazaarClient(BazaarSettings *settings);
|
|
|
|
|
|
|
|
|
|
BazaarSettings *settings() const;
|
2011-02-28 13:40:06 +01:00
|
|
|
|
2011-03-15 15:47:45 +01:00
|
|
|
bool synchronousSetUserId();
|
2011-02-28 13:40:06 +01:00
|
|
|
BranchInfo synchronousBranchQuery(const QString &repositoryRoot) const;
|
2011-04-08 13:42:49 +02:00
|
|
|
QString findTopLevelForFile(const QFileInfo &file) const;
|
2011-02-28 13:40:06 +01:00
|
|
|
|
2011-03-28 11:59:26 +02:00
|
|
|
private slots:
|
|
|
|
|
void bazaarDiff(const Bazaar::Internal::BazaarDiffParameters &p);
|
|
|
|
|
|
2011-02-28 13:40:06 +01:00
|
|
|
protected:
|
2011-04-08 13:42:49 +02:00
|
|
|
QString vcsEditorKind(VCSCommand cmd) const;
|
2011-02-28 13:40:06 +01:00
|
|
|
|
2011-04-08 13:42:49 +02:00
|
|
|
QStringList cloneArguments(const QString &srcLocation,
|
|
|
|
|
const QString &dstLocation,
|
2011-05-12 14:48:10 +02:00
|
|
|
const QStringList &extraOptions) const;
|
2011-04-08 13:42:49 +02:00
|
|
|
QStringList pullArguments(const QString &srcLocation,
|
2011-05-12 14:48:10 +02:00
|
|
|
const QStringList &extraOptions) const;
|
2011-04-08 13:42:49 +02:00
|
|
|
QStringList pushArguments(const QString &dstLocation,
|
2011-05-12 14:48:10 +02:00
|
|
|
const QStringList &extraOptions) const;
|
2011-04-08 13:42:49 +02:00
|
|
|
QStringList commitArguments(const QStringList &files,
|
|
|
|
|
const QString &commitMessageFile,
|
2011-05-12 14:48:10 +02:00
|
|
|
const QStringList &extraOptions) const;
|
2011-04-08 13:42:49 +02:00
|
|
|
QStringList importArguments(const QStringList &files) const;
|
|
|
|
|
QStringList updateArguments(const QString &revision) const;
|
|
|
|
|
QStringList revertArguments(const QString &file, const QString &revision) const;
|
|
|
|
|
QStringList revertAllArguments(const QString &revision) const;
|
|
|
|
|
QStringList annotateArguments(const QString &file,
|
|
|
|
|
const QString &revision, int lineNumber) const;
|
|
|
|
|
QStringList diffArguments(const QStringList &files,
|
2011-05-12 14:48:10 +02:00
|
|
|
const QStringList &extraOptions) const;
|
2011-04-08 13:42:49 +02:00
|
|
|
void initializeDiffEditor(const QString &workingDir, const QStringList &files,
|
2011-05-12 14:48:10 +02:00
|
|
|
const QStringList &extraOptions,
|
2011-04-08 13:42:49 +02:00
|
|
|
VCSBase::VCSBaseEditorWidget *diffEditorWidget);
|
2011-05-03 14:44:38 +02:00
|
|
|
QStringList logArguments(const QStringList &files,
|
2011-05-12 14:48:10 +02:00
|
|
|
const QStringList &extraOptions) const;
|
2011-04-08 13:42:49 +02:00
|
|
|
QStringList statusArguments(const QString &file) const;
|
|
|
|
|
QStringList viewArguments(const QString &revision) const;
|
2011-02-28 13:40:06 +01:00
|
|
|
|
2011-04-08 13:42:49 +02:00
|
|
|
QPair<QString, QString> parseStatusLine(const QString &line) const;
|
2011-02-28 13:40:06 +01:00
|
|
|
private:
|
|
|
|
|
friend class CloneWizard;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} //namespace Internal
|
|
|
|
|
} // namespace Bazaar
|
|
|
|
|
|
|
|
|
|
#endif // BAZAARCLIENT_H
|