diff options
author | Knut Petter Svendsen <[email protected]> | 2013-04-02 13:10:07 +0200 |
---|---|---|
committer | Knut Petter Svendsen <[email protected]> | 2013-04-03 12:57:35 +0200 |
commit | 91fe5f84d94ff52c311664d37c55bdee04497952 (patch) | |
tree | d9f50f264c27a92a1b3b818ef0f7c7379c8c4d05 /src/plugins/clearcase/clearcasesync.cpp | |
parent | f172818588e117da10365d1f23b463b159739951 (diff) |
ClearCase: Fix: Status actions was not correct for unix
A set view on unix will get / as topLevel. The output of
"cleartool -ls" with / as topLevel listed files with absolute path,
while with relative path for the the other cases (working directory
view and on windows). Root as topLevel is not 100% correct and should
be fixed in another patch. However, this patch fixes an annoying bug
for unix. (Before this patch multiple entries for the same file was
inserted in the status map - one with relative path and one with
absolute. Resulting in wrong lookup in updateStatusActions and thus
wrong status on the active file.
Change-Id: I178bafd21d712a445aca8e60ae3346549b55faaf
Reviewed-by: Orgad Shaneh <[email protected]>
Diffstat (limited to 'src/plugins/clearcase/clearcasesync.cpp')
-rw-r--r-- | src/plugins/clearcase/clearcasesync.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/clearcase/clearcasesync.cpp b/src/plugins/clearcase/clearcasesync.cpp index a65dfd6b72f..a9b97ea4735 100644 --- a/src/plugins/clearcase/clearcasesync.cpp +++ b/src/plugins/clearcase/clearcasesync.cpp @@ -114,21 +114,21 @@ void ClearCaseSync::run(QFutureInterface<void> &future, const QString &topLevel, if (atatpos != -1) { // probably managed file // find first whitespace. anything before that is not interesting int wspos = buffer.indexOf(QRegExp(QLatin1String("\\s"))); - const QString file = QDir::fromNativeSeparators(buffer.left(atatpos)); + const QString relFile = topLevelDir.relativeFilePath(QDir::fromNativeSeparators(buffer.left(atatpos))); QString ccState; QRegExp reState(QLatin1String("^\\s*\\[[^\\]]*\\]")); // [hijacked]; [loaded but missing] if (reState.indexIn(buffer, wspos + 1, QRegExp::CaretAtOffset) != -1) { ccState = reState.cap(); if (ccState.indexOf(QLatin1String("hijacked")) != -1) - m_plugin->setStatus(file, FileStatus::Hijacked, true); + m_plugin->setStatus(relFile, FileStatus::Hijacked, true); else if (ccState.indexOf(QLatin1String("loaded but missing")) != -1) - m_plugin->setStatus(file, FileStatus::Missing, false); + m_plugin->setStatus(relFile, FileStatus::Missing, false); } else if (buffer.lastIndexOf(QLatin1String("CHECKEDOUT"), wspos) != -1) - m_plugin->setStatus(file, FileStatus::CheckedOut, true); + m_plugin->setStatus(relFile, FileStatus::CheckedOut, true); // don't care about checked-in files not listed in project - else if (m_statusMap->contains(file)) - m_plugin->setStatus(file, FileStatus::CheckedIn, true); + else if (m_statusMap->contains(relFile)) + m_plugin->setStatus(relFile, FileStatus::CheckedIn, true); } buffer.clear(); future.setProgressValue(qMin(total, ++processed)); |