diff --git a/plugins/fossil/fossilclient.cpp b/plugins/fossil/fossilclient.cpp index a2817d0047a..ead861da5e5 100644 --- a/plugins/fossil/fossilclient.cpp +++ b/plugins/fossil/fossilclient.cpp @@ -392,9 +392,12 @@ RevisionInfo FossilClient::synchronousRevisionQuery(const QString &workingDirect const QRegularExpression idRx("([0-9a-f]{5,40})"); QTC_ASSERT(idRx.isValid(), return RevisionInfo()); + const QString hashToken = + (supportedFeatures().testFlag(InfoHashFeature) ? "hash: " : "uuid: "); + for (const QString &l : output.split('\n', QString::SkipEmptyParts)) { if (l.startsWith("checkout: ", Qt::CaseInsensitive) - || l.startsWith("uuid: ", Qt::CaseInsensitive)) { + || l.startsWith(hashToken, Qt::CaseInsensitive)) { const QRegularExpressionMatch idMatch = idRx.match(l); QTC_ASSERT(idMatch.hasMatch(), return RevisionInfo()); revisionId = idMatch.captured(1); @@ -407,8 +410,7 @@ RevisionInfo FossilClient::synchronousRevisionQuery(const QString &workingDirect const QRegularExpressionMatch idMatch = idRx.match(l); if (idMatch.hasMatch()) mergeParentIds.append(idMatch.captured(1)); - } else if (getCommentMsg - && l.startsWith("comment: ", Qt::CaseInsensitive)) { + } else if (getCommentMsg && l.startsWith("comment: ", Qt::CaseInsensitive)) { const QStringList commentLineParts = parseRevisionCommentLine(l); commentMsg = commentLineParts.value(0); committer = commentLineParts.value(1); @@ -891,8 +893,10 @@ FossilClient::SupportedFeatures FossilClient::supportedFeatures() const const unsigned int version = binaryVersion(); - if (version < 0x20400) { - features &= ~AnnotateRevisionFeature; + if (version < 0x21200) { + features &= ~InfoHashFeature; + if (version < 0x20400) + features &= ~AnnotateRevisionFeature; if (version < 0x13000) features &= ~TimelinePathFeature; if (version < 0x12900) diff --git a/plugins/fossil/fossilclient.h b/plugins/fossil/fossilclient.h index 7c9fba07785..20f32142e07 100644 --- a/plugins/fossil/fossilclient.h +++ b/plugins/fossil/fossilclient.h @@ -49,12 +49,14 @@ public: DiffIgnoreWhiteSpaceFeature = 0x8, TimelinePathFeature = 0x10, AnnotateRevisionFeature = 0x20, + InfoHashFeature = 0x40, AllSupportedFeatures = // | all defined features AnnotateBlameFeature | TimelineWidthFeature | DiffIgnoreWhiteSpaceFeature | TimelinePathFeature | AnnotateRevisionFeature + | InfoHashFeature }; Q_DECLARE_FLAGS(SupportedFeatures, SupportedFeature)