Commit 326ea080 authored by cerf's avatar cerf Committed by Tobias Hunger

vcsbase: VCSBaseClient::log() now accepts extra options

Merge-request: 323
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 01fa9f6c
......@@ -339,9 +339,10 @@ QStringList BazaarClient::diffArguments(const QStringList &files,
return args;
}
QStringList BazaarClient::logArguments(const QStringList &files) const
QStringList BazaarClient::logArguments(const QStringList &files,
const ExtraCommandOptions &extraOptions) const
{
return diffArguments(files, ExtraCommandOptions());
return diffArguments(files, extraOptions);
}
QStringList BazaarClient::statusArguments(const QString &file) const
......
......@@ -103,7 +103,8 @@ protected:
void initializeDiffEditor(const QString &workingDir, const QStringList &files,
const VCSBase::VCSBaseClient::ExtraCommandOptions &extra,
VCSBase::VCSBaseEditorWidget *diffEditorWidget);
QStringList logArguments(const QStringList &files) const;
QStringList logArguments(const QStringList &files,
const ExtraCommandOptions &extraOptions) const;
QStringList statusArguments(const QString &file) const;
QStringList viewArguments(const QString &revision) const;
......
......@@ -318,7 +318,8 @@ void BazaarPlugin::logCurrentFile()
{
const VCSBase::VCSBasePluginState state = currentState();
QTC_ASSERT(state.hasFile(), return);
m_client->log(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()), true);
m_client->log(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()),
BazaarClient::ExtraCommandOptions(), true);
}
void BazaarPlugin::revertCurrentFile()
......
......@@ -457,8 +457,10 @@ QStringList MercurialClient::diffArguments(const QStringList &files,
return args;
}
QStringList MercurialClient::logArguments(const QStringList &files) const
QStringList MercurialClient::logArguments(const QStringList &files,
const ExtraCommandOptions &extraOptions) const
{
Q_UNUSED(extraOptions);
QStringList args;
if (!files.empty())
args.append(files);
......
......@@ -101,7 +101,8 @@ protected:
void initializeDiffEditor(const QString &workingDir, const QStringList &files,
const VCSBase::VCSBaseClient::ExtraCommandOptions &extra,
VCSBase::VCSBaseEditorWidget *ed);
QStringList logArguments(const QStringList &files) const;
QStringList logArguments(const QStringList &files,
const ExtraCommandOptions &extraOptions) const;
QStringList statusArguments(const QString &file) const;
QStringList viewArguments(const QString &revision) const;
......
......@@ -317,7 +317,8 @@ void MercurialPlugin::logCurrentFile()
{
const VCSBase::VCSBasePluginState state = currentState();
QTC_ASSERT(state.hasFile(), return)
m_client->log(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()), true);
m_client->log(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()),
MercurialClient::ExtraCommandOptions(), true);
}
void MercurialPlugin::revertCurrentFile()
......
......@@ -291,11 +291,12 @@ void VCSBaseClient::diff(const QString &workingDir, const QStringList &files,
}
void VCSBaseClient::log(const QString &workingDir, const QStringList &files,
const ExtraCommandOptions &extraOptions,
bool enableAnnotationContextMenu)
{
const QString vcsCmdString = vcsCommandString(LogCommand);
QStringList args;
args << vcsCmdString << logArguments(files);
args << vcsCmdString << logArguments(files, extraOptions);
const QString kind = vcsEditorKind(LogCommand);
const QString id = VCSBase::VCSBaseEditorWidget::getTitleId(workingDir, files);
const QString title = vcsEditorTitle(vcsCmdString, id);
......
......@@ -91,6 +91,7 @@ public:
void diff(const QString &workingDir, const QStringList &files = QStringList(),
const ExtraCommandOptions &extraOptions = ExtraCommandOptions());
void log(const QString &workingDir, const QStringList &files = QStringList(),
const ExtraCommandOptions &extraOptions = ExtraCommandOptions(),
bool enableAnnotationContextMenu = false);
void status(const QString &workingDir, const QString &file = QString());
void statusWithSignal(const QString &repository);
......@@ -158,7 +159,8 @@ protected:
const ExtraCommandOptions &extraOptions) const = 0;
virtual void initializeDiffEditor(const QString &workingDir, const QStringList &files,
const ExtraCommandOptions &extraOptions, VCSBaseEditorWidget *ed);
virtual QStringList logArguments(const QStringList &files) const = 0;
virtual QStringList logArguments(const QStringList &files,
const ExtraCommandOptions &extraOptions) const = 0;
virtual QStringList statusArguments(const QString &file) const = 0;
virtual QStringList viewArguments(const QString &revision) const = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment