MCPcopy Create free account
hub / github.com/KDE/kdevelop / getRevisionSpecRange

Method getRevisionSpecRange

plugins/bazaar/bazaarutils.cpp:48–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46}
47
48QString BazaarUtils::getRevisionSpecRange(const KDevelop::VcsRevision& end)
49{
50 if (end.revisionType() == KDevelop::VcsRevision::Special) {
51 if (end.specialType() == KDevelop::VcsRevision::Head) {
52 return QStringLiteral("-r..last:1");
53 } else if (end.specialType() == KDevelop::VcsRevision::Base) {
54 return QStringLiteral("-r..last:1"); // Workaround strange KDevelop behaviour
55 } else if (end.specialType() == KDevelop::VcsRevision::Working) {
56 return QString();
57 } else if (end.specialType() == KDevelop::VcsRevision::Start) {
58 return QStringLiteral("-..r1");
59 } else {
60 return QString(); // Don't know how to handle this situation
61 }
62 } else if (end.revisionType() == KDevelop::VcsRevision::GlobalNumber) {
63 return QStringLiteral("-r") + QString::number(end.revisionValue().toLongLong());
64 }
65
66 return QString(); // Don't know how to handle this situation
67}
68
69QString BazaarUtils::getRevisionSpecRange(const KDevelop::VcsRevision& begin,
70 const KDevelop::VcsRevision& end)

Callers

nothing calls this directly

Calls 4

revisionTypeMethod · 0.80
specialTypeMethod · 0.80
revisionValueMethod · 0.80
QStringClass · 0.50

Tested by

no test coverage detected