summaryrefslogtreecommitdiff
path: root/src/plugins/mercurial/mercurialeditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/mercurial/mercurialeditor.cpp')
-rw-r--r--src/plugins/mercurial/mercurialeditor.cpp25
1 files changed, 2 insertions, 23 deletions
diff --git a/src/plugins/mercurial/mercurialeditor.cpp b/src/plugins/mercurial/mercurialeditor.cpp
index 4e775e6a93..4eafe92b72 100644
--- a/src/plugins/mercurial/mercurialeditor.cpp
+++ b/src/plugins/mercurial/mercurialeditor.cpp
@@ -51,9 +51,9 @@ MercurialEditor::MercurialEditor(const VcsBase::VcsBaseEditorParameters *type, Q
exactIdentifier12(QLatin1String(Constants::CHANGEIDEXACT12)),
exactIdentifier40(QLatin1String(Constants::CHANGEIDEXACT40)),
changesetIdentifier12(QLatin1String(Constants::CHANGESETID12)),
- changesetIdentifier40(QLatin1String(Constants::CHANGESETID40)),
- diffIdentifier(QLatin1String(Constants::DIFFIDENTIFIER))
+ changesetIdentifier40(QLatin1String(Constants::CHANGESETID40))
{
+ setDiffFilePattern(QRegExp(QLatin1String(Constants::DIFFIDENTIFIER)));
setAnnotateRevisionTextFormat(tr("Annotate %1"));
setAnnotatePreviousRevisionTextFormat(tr("Annotate parent revision %1"));
}
@@ -88,33 +88,12 @@ QString MercurialEditor::changeUnderCursor(const QTextCursor &cursorIn) const
return QString();
}
-QRegExp MercurialEditor::diffFilePattern() const
-{
- return diffIdentifier;
-}
-
VcsBase::BaseAnnotationHighlighter *MercurialEditor::createAnnotationHighlighter(const QSet<QString> &changes,
const QColor &bg) const
{
return new MercurialAnnotationHighlighter(changes, bg);
}
-QString MercurialEditor::fileNameFromDiffSpecification(const QTextBlock &inBlock) const
-{
- // git-compatible format: check for "+++ b/src/plugins/git/giteditor.cpp" (blame and diff)
- // Go back chunks.
- const QString newFileIndicator = QLatin1String("+++ b/");
- for (QTextBlock block = inBlock; block.isValid(); block = block.previous()) {
- QString diffFileName = block.text();
- if (diffFileName.startsWith(newFileIndicator)) {
- diffFileName.remove(0, newFileIndicator.size());
- return findDiffFile(diffFileName);
- }
-
- }
- return QString();
-}
-
QString MercurialEditor::decorateVersion(const QString &revision) const
{
const QFileInfo fi(source());