forked from qt-creator/qt-creator
VCS: Add vcsDescribe
Already exists in all implementations, but there was no common declaration. Change-Id: Ieb3d10d1936c207722b5001712bce41e8114dcdc Reviewed-by: André Hartmann <aha_1980@gmx.de>
This commit is contained in:
committed by
Orgad Shaneh
parent
e9df7825fa
commit
5ebe34a332
@@ -161,6 +161,7 @@ public:
|
|||||||
bool vcsMove(const QString &from, const QString &to) final;
|
bool vcsMove(const QString &from, const QString &to) final;
|
||||||
bool vcsCreateRepository(const QString &directory) final;
|
bool vcsCreateRepository(const QString &directory) final;
|
||||||
void vcsAnnotate(const QString &file, int line) final;
|
void vcsAnnotate(const QString &file, int line) final;
|
||||||
|
void vcsDescribe(const QString &source, const QString &id) final { m_client.view(source, id); }
|
||||||
|
|
||||||
Core::ShellCommand *createInitialCheckoutCommand(const QString &url,
|
Core::ShellCommand *createInitialCheckoutCommand(const QString &url,
|
||||||
const Utils::FilePath &baseDirectory,
|
const Utils::FilePath &baseDirectory,
|
||||||
@@ -203,8 +204,6 @@ public:
|
|||||||
void createDirectoryActions(const Core::Context &context);
|
void createDirectoryActions(const Core::Context &context);
|
||||||
void createRepositoryActions(const Core::Context &context);
|
void createRepositoryActions(const Core::Context &context);
|
||||||
|
|
||||||
void describe(const QString &source, const QString &id) { m_client.view(source, id); }
|
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
BazaarSettings m_settings;
|
BazaarSettings m_settings;
|
||||||
BazaarClient m_client{&m_settings};
|
BazaarClient m_client{&m_settings};
|
||||||
@@ -238,19 +237,19 @@ public:
|
|||||||
VcsEditorFactory logEditorFactory {
|
VcsEditorFactory logEditorFactory {
|
||||||
&logEditorParameters,
|
&logEditorParameters,
|
||||||
[] { return new BazaarEditorWidget; },
|
[] { return new BazaarEditorWidget; },
|
||||||
std::bind(&BazaarPluginPrivate::describe, this, _1, _2)
|
std::bind(&BazaarPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory annotateEditorFactory {
|
VcsEditorFactory annotateEditorFactory {
|
||||||
&annotateEditorParameters,
|
&annotateEditorParameters,
|
||||||
[] { return new BazaarEditorWidget; },
|
[] { return new BazaarEditorWidget; },
|
||||||
std::bind(&BazaarPluginPrivate::describe, this, _1, _2)
|
std::bind(&BazaarPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory diffEditorFactory {
|
VcsEditorFactory diffEditorFactory {
|
||||||
&diffEditorParameters,
|
&diffEditorParameters,
|
||||||
[] { return new BazaarEditorWidget; },
|
[] { return new BazaarEditorWidget; },
|
||||||
std::bind(&BazaarPluginPrivate::describe, this, _1, _2)
|
std::bind(&BazaarPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -200,6 +200,7 @@ public:
|
|||||||
bool vcsCreateRepository(const QString &directory) final;
|
bool vcsCreateRepository(const QString &directory) final;
|
||||||
|
|
||||||
void vcsAnnotate(const QString &file, int line) final;
|
void vcsAnnotate(const QString &file, int line) final;
|
||||||
|
void vcsDescribe(const QString &source, const QString &changeNr) final;
|
||||||
|
|
||||||
QString vcsOpenText() const final;
|
QString vcsOpenText() const final;
|
||||||
QString vcsMakeWritableText() const final;
|
QString vcsMakeWritableText() const final;
|
||||||
@@ -250,7 +251,6 @@ public:
|
|||||||
const QString &revision = QString(), int lineNumber = -1) const;
|
const QString &revision = QString(), int lineNumber = -1) const;
|
||||||
bool newActivity();
|
bool newActivity();
|
||||||
void updateStreamAndView();
|
void updateStreamAndView();
|
||||||
void describe(const QString &source, const QString &changeNr);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void updateActions(VcsBase::VcsBasePluginPrivate::ActionState) override;
|
void updateActions(VcsBase::VcsBasePluginPrivate::ActionState) override;
|
||||||
@@ -363,19 +363,19 @@ private:
|
|||||||
VcsEditorFactory logEditorFactory {
|
VcsEditorFactory logEditorFactory {
|
||||||
&logEditorParameters,
|
&logEditorParameters,
|
||||||
[] { return new ClearCaseEditorWidget; },
|
[] { return new ClearCaseEditorWidget; },
|
||||||
std::bind(&ClearCasePluginPrivate::describe, this, _1, _2)
|
std::bind(&ClearCasePluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory annotateEditorFactory {
|
VcsEditorFactory annotateEditorFactory {
|
||||||
&annotateEditorParameters,
|
&annotateEditorParameters,
|
||||||
[] { return new ClearCaseEditorWidget; },
|
[] { return new ClearCaseEditorWidget; },
|
||||||
std::bind(&ClearCasePluginPrivate::describe, this, _1, _2)
|
std::bind(&ClearCasePluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory diffEditorFactory {
|
VcsEditorFactory diffEditorFactory {
|
||||||
&diffEditorParameters,
|
&diffEditorParameters,
|
||||||
[] { return new ClearCaseEditorWidget; },
|
[] { return new ClearCaseEditorWidget; },
|
||||||
std::bind(&ClearCasePluginPrivate::describe, this, _1, _2)
|
std::bind(&ClearCasePluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
friend class ClearCasePlugin;
|
friend class ClearCasePlugin;
|
||||||
@@ -1605,7 +1605,7 @@ void ClearCasePluginPrivate::vcsAnnotateHelper(const QString &workingDir, const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClearCasePluginPrivate::describe(const QString &source, const QString &changeNr)
|
void ClearCasePluginPrivate::vcsDescribe(const QString &source, const QString &changeNr)
|
||||||
{
|
{
|
||||||
const QFileInfo fi(source);
|
const QFileInfo fi(source);
|
||||||
QString topLevel;
|
QString topLevel;
|
||||||
|
@@ -211,6 +211,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual QString vcsMakeWritableText() const;
|
virtual QString vcsMakeWritableText() const;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Display details of reference
|
||||||
|
*/
|
||||||
|
virtual void vcsDescribe(const QString &workingDirectory, const QString &reference) = 0;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Return a list of paths where tools that came with the VCS may be installed.
|
* Return a list of paths where tools that came with the VCS may be installed.
|
||||||
* This is helpful on windows where e.g. git comes with a lot of nice unix tools.
|
* This is helpful on windows where e.g. git comes with a lot of nice unix tools.
|
||||||
@@ -297,6 +302,7 @@ public:
|
|||||||
bool vcsMove(const QString &, const QString &) override { return false; }
|
bool vcsMove(const QString &, const QString &) override { return false; }
|
||||||
bool vcsCreateRepository(const QString &) override { return false; }
|
bool vcsCreateRepository(const QString &) override { return false; }
|
||||||
void vcsAnnotate(const QString &, int) override {}
|
void vcsAnnotate(const QString &, int) override {}
|
||||||
|
void vcsDescribe(const QString &, const QString &) override {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Id m_id;
|
Id m_id;
|
||||||
|
@@ -271,6 +271,7 @@ public:
|
|||||||
|
|
||||||
void vcsAnnotate(const QString &workingDirectory, const QString &file,
|
void vcsAnnotate(const QString &workingDirectory, const QString &file,
|
||||||
const QString &revision, int lineNumber);
|
const QString &revision, int lineNumber);
|
||||||
|
void vcsDescribe(const QString &source, const QString &changeNr) final;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void updateActions(ActionState) final;
|
void updateActions(ActionState) final;
|
||||||
@@ -318,7 +319,6 @@ private:
|
|||||||
bool describe(const QString &source, const QString &changeNr, QString *errorMessage);
|
bool describe(const QString &source, const QString &changeNr, QString *errorMessage);
|
||||||
bool describe(const QString &toplevel, const QString &source, const QString &changeNr, QString *errorMessage);
|
bool describe(const QString &toplevel, const QString &source, const QString &changeNr, QString *errorMessage);
|
||||||
bool describe(const QString &repository, QList<CvsLogEntry> entries, QString *errorMessage);
|
bool describe(const QString &repository, QList<CvsLogEntry> entries, QString *errorMessage);
|
||||||
void describeHelper(const QString &source, const QString &changeNr);
|
|
||||||
void filelog(const QString &workingDir,
|
void filelog(const QString &workingDir,
|
||||||
const QString &file = QString(),
|
const QString &file = QString(),
|
||||||
bool enableAnnotationContextMenu = false);
|
bool enableAnnotationContextMenu = false);
|
||||||
@@ -379,25 +379,25 @@ public:
|
|||||||
VcsEditorFactory commandLogEditorFactory {
|
VcsEditorFactory commandLogEditorFactory {
|
||||||
&commandLogEditorParameters,
|
&commandLogEditorParameters,
|
||||||
[] { return new CvsEditorWidget; },
|
[] { return new CvsEditorWidget; },
|
||||||
std::bind(&CvsPluginPrivate::describeHelper, this, _1, _2)
|
std::bind(&CvsPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory logEditorFactory {
|
VcsEditorFactory logEditorFactory {
|
||||||
&logEditorParameters,
|
&logEditorParameters,
|
||||||
[] { return new CvsEditorWidget; },
|
[] { return new CvsEditorWidget; },
|
||||||
std::bind(&CvsPluginPrivate::describeHelper, this, _1, _2)
|
std::bind(&CvsPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory annotateEditorFactory {
|
VcsEditorFactory annotateEditorFactory {
|
||||||
&annotateEditorParameters,
|
&annotateEditorParameters,
|
||||||
[] { return new CvsEditorWidget; },
|
[] { return new CvsEditorWidget; },
|
||||||
std::bind(&CvsPluginPrivate::describeHelper, this, _1, _2)
|
std::bind(&CvsPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory diffEditorFactory {
|
VcsEditorFactory diffEditorFactory {
|
||||||
&diffEditorParameters,
|
&diffEditorParameters,
|
||||||
[] { return new CvsEditorWidget; },
|
[] { return new CvsEditorWidget; },
|
||||||
std::bind(&CvsPluginPrivate::describeHelper, this, _1, _2)
|
std::bind(&CvsPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -740,7 +740,7 @@ CvsPluginPrivate::CvsPluginPrivate()
|
|||||||
m_commandLocator->appendCommand(command);
|
m_commandLocator->appendCommand(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CvsPluginPrivate::describeHelper(const QString &source, const QString &changeNr)
|
void CvsPluginPrivate::vcsDescribe(const QString &source, const QString &changeNr)
|
||||||
{
|
{
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
if (!describe(source, changeNr, &errorMessage))
|
if (!describe(source, changeNr, &errorMessage))
|
||||||
|
@@ -250,6 +250,7 @@ public:
|
|||||||
bool vcsCreateRepository(const QString &directory) final;
|
bool vcsCreateRepository(const QString &directory) final;
|
||||||
|
|
||||||
void vcsAnnotate(const QString &file, int line) final;
|
void vcsAnnotate(const QString &file, int line) final;
|
||||||
|
void vcsDescribe(const QString &source, const QString &id) final { m_gitClient.show(source, id); };
|
||||||
QString vcsTopic(const QString &directory) final;
|
QString vcsTopic(const QString &directory) final;
|
||||||
|
|
||||||
Core::ShellCommand *createInitialCheckoutCommand(const QString &url,
|
Core::ShellCommand *createInitialCheckoutCommand(const QString &url,
|
||||||
@@ -264,7 +265,7 @@ public:
|
|||||||
menu->addAction(tr("&Copy \"%1\"").arg(reference),
|
menu->addAction(tr("&Copy \"%1\"").arg(reference),
|
||||||
[reference] { QApplication::clipboard()->setText(reference); });
|
[reference] { QApplication::clipboard()->setText(reference); });
|
||||||
QAction *action = menu->addAction(tr("&Describe Change %1").arg(reference),
|
QAction *action = menu->addAction(tr("&Describe Change %1").arg(reference),
|
||||||
[=] { describe(workingDirectory, reference); });
|
[=] { vcsDescribe(workingDirectory, reference); });
|
||||||
menu->setDefaultAction(action);
|
menu->setDefaultAction(action);
|
||||||
GitClient::addChangeActions(menu, workingDirectory, reference);
|
GitClient::addChangeActions(menu, workingDirectory, reference);
|
||||||
}
|
}
|
||||||
@@ -366,7 +367,6 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
void onApplySettings();;
|
void onApplySettings();;
|
||||||
void describe(const QString &source, const QString &id) { m_gitClient.show(source, id); };
|
|
||||||
|
|
||||||
Core::CommandLocator *m_commandLocator = nullptr;
|
Core::CommandLocator *m_commandLocator = nullptr;
|
||||||
|
|
||||||
@@ -407,37 +407,37 @@ public:
|
|||||||
VcsEditorFactory svnLogEditorFactory {
|
VcsEditorFactory svnLogEditorFactory {
|
||||||
&svnLogEditorParameters,
|
&svnLogEditorParameters,
|
||||||
[] { return new GitEditorWidget; },
|
[] { return new GitEditorWidget; },
|
||||||
std::bind(&GitPluginPrivate::describe, this, _1, _2)
|
std::bind(&GitPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory logEditorFactory {
|
VcsEditorFactory logEditorFactory {
|
||||||
&logEditorParameters,
|
&logEditorParameters,
|
||||||
[] { return new GitLogEditorWidgetT<GitEditorWidget>; },
|
[] { return new GitLogEditorWidgetT<GitEditorWidget>; },
|
||||||
std::bind(&GitPluginPrivate::describe, this, _1, _2)
|
std::bind(&GitPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory reflogEditorFactory {
|
VcsEditorFactory reflogEditorFactory {
|
||||||
&reflogEditorParameters,
|
&reflogEditorParameters,
|
||||||
[] { return new GitLogEditorWidgetT<GitReflogEditorWidget>; },
|
[] { return new GitLogEditorWidgetT<GitReflogEditorWidget>; },
|
||||||
std::bind(&GitPluginPrivate::describe, this, _1, _2)
|
std::bind(&GitPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory blameEditorFactory {
|
VcsEditorFactory blameEditorFactory {
|
||||||
&blameEditorParameters,
|
&blameEditorParameters,
|
||||||
[] { return new GitEditorWidget; },
|
[] { return new GitEditorWidget; },
|
||||||
std::bind(&GitPluginPrivate::describe, this, _1, _2)
|
std::bind(&GitPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory commitTextEditorFactory {
|
VcsEditorFactory commitTextEditorFactory {
|
||||||
&commitTextEditorParameters,
|
&commitTextEditorParameters,
|
||||||
[] { return new GitEditorWidget; },
|
[] { return new GitEditorWidget; },
|
||||||
std::bind(&GitPluginPrivate::describe, this, _1, _2)
|
std::bind(&GitPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory rebaseEditorFactory {
|
VcsEditorFactory rebaseEditorFactory {
|
||||||
&rebaseEditorParameters,
|
&rebaseEditorParameters,
|
||||||
[] { return new GitEditorWidget; },
|
[] { return new GitEditorWidget; },
|
||||||
std::bind(&GitPluginPrivate::describe, this, _1, _2)
|
std::bind(&GitPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsSubmitEditorFactory submitEditorFactory {
|
VcsSubmitEditorFactory submitEditorFactory {
|
||||||
|
@@ -145,6 +145,7 @@ public:
|
|||||||
bool vcsMove(const QString &from, const QString &to) final;
|
bool vcsMove(const QString &from, const QString &to) final;
|
||||||
bool vcsCreateRepository(const QString &directory) final;
|
bool vcsCreateRepository(const QString &directory) final;
|
||||||
void vcsAnnotate(const QString &file, int line) final;
|
void vcsAnnotate(const QString &file, int line) final;
|
||||||
|
void vcsDescribe(const QString &source, const QString &id) final { m_client.view(source, id); }
|
||||||
|
|
||||||
Core::ShellCommand *createInitialCheckoutCommand(const QString &url,
|
Core::ShellCommand *createInitialCheckoutCommand(const QString &url,
|
||||||
const Utils::FilePath &baseDirectory,
|
const Utils::FilePath &baseDirectory,
|
||||||
@@ -193,8 +194,6 @@ private:
|
|||||||
void createDirectoryActions(const Core::Context &context);
|
void createDirectoryActions(const Core::Context &context);
|
||||||
void createRepositoryActions(const Core::Context &context);
|
void createRepositoryActions(const Core::Context &context);
|
||||||
|
|
||||||
void describe(const QString &source, const QString &id) { m_client.view(source, id); }
|
|
||||||
|
|
||||||
// Variables
|
// Variables
|
||||||
MercurialSettings m_settings;
|
MercurialSettings m_settings;
|
||||||
MercurialClient m_client{&m_settings};
|
MercurialClient m_client{&m_settings};
|
||||||
@@ -232,19 +231,19 @@ public:
|
|||||||
VcsEditorFactory logEditorFactory {
|
VcsEditorFactory logEditorFactory {
|
||||||
&logEditorParameters,
|
&logEditorParameters,
|
||||||
[this] { return new MercurialEditorWidget(&m_client); },
|
[this] { return new MercurialEditorWidget(&m_client); },
|
||||||
std::bind(&MercurialPluginPrivate::describe, this, _1, _2)
|
std::bind(&MercurialPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory annotateEditorFactory {
|
VcsEditorFactory annotateEditorFactory {
|
||||||
&annotateEditorParameters,
|
&annotateEditorParameters,
|
||||||
[this] { return new MercurialEditorWidget(&m_client); },
|
[this] { return new MercurialEditorWidget(&m_client); },
|
||||||
std::bind(&MercurialPluginPrivate::describe, this, _1, _2)
|
std::bind(&MercurialPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory diffEditorFactory {
|
VcsEditorFactory diffEditorFactory {
|
||||||
&diffEditorParameters,
|
&diffEditorParameters,
|
||||||
[this] { return new MercurialEditorWidget(&m_client); },
|
[this] { return new MercurialEditorWidget(&m_client); },
|
||||||
std::bind(&MercurialPluginPrivate::describe, this, _1, _2)
|
std::bind(&MercurialPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -224,6 +224,7 @@ public:
|
|||||||
bool vcsMove(const QString &from, const QString &to) final;
|
bool vcsMove(const QString &from, const QString &to) final;
|
||||||
bool vcsCreateRepository(const QString &directory) final;
|
bool vcsCreateRepository(const QString &directory) final;
|
||||||
void vcsAnnotate(const QString &file, int line) final;
|
void vcsAnnotate(const QString &file, int line) final;
|
||||||
|
void vcsDescribe(const QString &source, const QString &n) final;
|
||||||
QString vcsOpenText() const final;
|
QString vcsOpenText() const final;
|
||||||
QString vcsMakeWritableText() const final;
|
QString vcsMakeWritableText() const final;
|
||||||
|
|
||||||
@@ -237,7 +238,6 @@ public:
|
|||||||
|
|
||||||
IEditor *openPerforceSubmitEditor(const QString &fileName, const QStringList &depotFileNames);
|
IEditor *openPerforceSubmitEditor(const QString &fileName, const QStringList &depotFileNames);
|
||||||
|
|
||||||
void describe(const QString &source, const QString &n);
|
|
||||||
void getTopLevel(const QString &workingDirectory = QString(), bool isSync = false);
|
void getTopLevel(const QString &workingDirectory = QString(), bool isSync = false);
|
||||||
|
|
||||||
void updateActions(ActionState) override;
|
void updateActions(ActionState) override;
|
||||||
@@ -371,19 +371,19 @@ public:
|
|||||||
VcsEditorFactory logEditorFactory {
|
VcsEditorFactory logEditorFactory {
|
||||||
&logEditorParameters,
|
&logEditorParameters,
|
||||||
[] { return new PerforceEditorWidget; },
|
[] { return new PerforceEditorWidget; },
|
||||||
std::bind(&PerforcePluginPrivate::describe, this, _1, _2)
|
std::bind(&PerforcePluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory annotateEditorFactory {
|
VcsEditorFactory annotateEditorFactory {
|
||||||
&annotateEditorParameters,
|
&annotateEditorParameters,
|
||||||
[] { return new PerforceEditorWidget; },
|
[] { return new PerforceEditorWidget; },
|
||||||
std::bind(&PerforcePluginPrivate::describe, this, _1, _2)
|
std::bind(&PerforcePluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory diffEditorFactory {
|
VcsEditorFactory diffEditorFactory {
|
||||||
&diffEditorParameters,
|
&diffEditorParameters,
|
||||||
[] { return new PerforceEditorWidget; },
|
[] { return new PerforceEditorWidget; },
|
||||||
std::bind(&PerforcePluginPrivate::describe, this, _1, _2)
|
std::bind(&PerforcePluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -824,7 +824,7 @@ void PerforcePluginPrivate::describeChange()
|
|||||||
{
|
{
|
||||||
ChangeNumberDialog dia;
|
ChangeNumberDialog dia;
|
||||||
if (dia.exec() == QDialog::Accepted && dia.number() > 0)
|
if (dia.exec() == QDialog::Accepted && dia.number() > 0)
|
||||||
describe(QString(), QString::number(dia.number()));
|
vcsDescribe(QString(), QString::number(dia.number()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PerforcePluginPrivate::annotateCurrentFile()
|
void PerforcePluginPrivate::annotateCurrentFile()
|
||||||
@@ -1539,7 +1539,7 @@ void PerforcePluginPrivate::p4Diff(const PerforceDiffParameters &p)
|
|||||||
diffEditorWidget->setEditorConfig(pw);
|
diffEditorWidget->setEditorConfig(pw);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PerforcePluginPrivate::describe(const QString & source, const QString &n)
|
void PerforcePluginPrivate::vcsDescribe(const QString & source, const QString &n)
|
||||||
{
|
{
|
||||||
QTextCodec *codec = source.isEmpty() ? static_cast<QTextCodec *>(nullptr)
|
QTextCodec *codec = source.isEmpty() ? static_cast<QTextCodec *>(nullptr)
|
||||||
: VcsBaseEditor::getCodec(source);
|
: VcsBaseEditor::getCodec(source);
|
||||||
|
@@ -222,6 +222,7 @@ public:
|
|||||||
bool vcsCreateRepository(const QString &directory) final;
|
bool vcsCreateRepository(const QString &directory) final;
|
||||||
|
|
||||||
void vcsAnnotate(const QString &file, int line) final;
|
void vcsAnnotate(const QString &file, int line) final;
|
||||||
|
void vcsDescribe(const QString &source, const QString &changeNr) final;
|
||||||
|
|
||||||
Core::ShellCommand *createInitialCheckoutCommand(const QString &url,
|
Core::ShellCommand *createInitialCheckoutCommand(const QString &url,
|
||||||
const Utils::FilePath &baseDirectory,
|
const Utils::FilePath &baseDirectory,
|
||||||
@@ -248,7 +249,6 @@ public:
|
|||||||
SubversionResponse runSvn(const QString &workingDir,
|
SubversionResponse runSvn(const QString &workingDir,
|
||||||
const QStringList &arguments, int timeOutS,
|
const QStringList &arguments, int timeOutS,
|
||||||
unsigned flags, QTextCodec *outputCodec = nullptr) const;
|
unsigned flags, QTextCodec *outputCodec = nullptr) const;
|
||||||
void describe(const QString &source, const QString &changeNr);
|
|
||||||
void vcsAnnotateHelper(const QString &workingDir, const QString &file,
|
void vcsAnnotateHelper(const QString &workingDir, const QString &file,
|
||||||
const QString &revision = QString(), int lineNumber = -1);
|
const QString &revision = QString(), int lineNumber = -1);
|
||||||
|
|
||||||
@@ -335,13 +335,13 @@ public:
|
|||||||
VcsEditorFactory logEditorFactory {
|
VcsEditorFactory logEditorFactory {
|
||||||
&logEditorParameters,
|
&logEditorParameters,
|
||||||
[] { return new SubversionEditorWidget; },
|
[] { return new SubversionEditorWidget; },
|
||||||
std::bind(&SubversionPluginPrivate::describe, this, _1, _2)
|
std::bind(&SubversionPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
|
|
||||||
VcsEditorFactory blameEditorFactory {
|
VcsEditorFactory blameEditorFactory {
|
||||||
&blameEditorParameters,
|
&blameEditorParameters,
|
||||||
[] { return new SubversionEditorWidget; },
|
[] { return new SubversionEditorWidget; },
|
||||||
std::bind(&SubversionPluginPrivate::describe, this, _1, _2)
|
std::bind(&SubversionPluginPrivate::vcsDescribe, this, _1, _2)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -967,7 +967,7 @@ void SubversionPluginPrivate::projectStatus()
|
|||||||
svnStatus(state.currentProjectTopLevel(), state.relativeCurrentProject());
|
svnStatus(state.currentProjectTopLevel(), state.relativeCurrentProject());
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubversionPluginPrivate::describe(const QString &source, const QString &changeNr)
|
void SubversionPluginPrivate::vcsDescribe(const QString &source, const QString &changeNr)
|
||||||
{
|
{
|
||||||
// To describe a complete change, find the top level and then do
|
// To describe a complete change, find the top level and then do
|
||||||
//svn diff -r 472958:472959 <top level>
|
//svn diff -r 472958:472959 <top level>
|
||||||
@@ -1004,7 +1004,7 @@ void SubversionPluginPrivate::slotDescribe()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
const int revision = inputDialog.intValue();
|
const int revision = inputDialog.intValue();
|
||||||
describe(state.topLevel(), QString::number(revision));
|
vcsDescribe(state.topLevel(), QString::number(revision));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubversionPluginPrivate::commitFromEditor()
|
void SubversionPluginPrivate::commitFromEditor()
|
||||||
|
Reference in New Issue
Block a user