diff options
author | Orgad Shaneh <[email protected]> | 2012-10-03 18:03:53 +0200 |
---|---|---|
committer | Orgad Shaneh <[email protected]> | 2012-10-04 16:50:11 +0200 |
commit | b55dcc29aee0b45028d5aff8202c0dc20bcd7b5e (patch) | |
tree | 8ddc910a57efd294d3c7c68a1264305e7d6f2856 /src/plugins/clearcase/clearcaseplugin.cpp | |
parent | 34354148dbe4483898d6fa281a80e09c4ea91e66 (diff) |
ClearCase: Fix top level optimization for unix
Also use the optimization for snapshot views as well.
Change-Id: Ic8c2d9f874f09b6b3b4a50eb8c5d396f10ecd6cd
Reviewed-by: Knut Petter Svendsen <[email protected]>
Reviewed-by: Tobias Hunger <[email protected]>
Diffstat (limited to 'src/plugins/clearcase/clearcaseplugin.cpp')
-rw-r--r-- | src/plugins/clearcase/clearcaseplugin.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/clearcase/clearcaseplugin.cpp b/src/plugins/clearcase/clearcaseplugin.cpp index 62fb59c6aa4..bafbf235e14 100644 --- a/src/plugins/clearcase/clearcaseplugin.cpp +++ b/src/plugins/clearcase/clearcaseplugin.cpp @@ -224,6 +224,10 @@ bool ClearCasePlugin::isCheckInEditorOpen() const */ QString ClearCasePlugin::findTopLevel(const QString &directory) const { + if ((directory == m_topLevel) || + Utils::FileName::fromString(directory).isChildOf(Utils::FileName::fromString(m_topLevel))) + return m_topLevel; + // Snapshot view QString topLevel = findRepositoryForDirectory(directory, QLatin1String(ClearCase::Constants::CLEARCASE_ROOT_FILE)); @@ -231,8 +235,6 @@ QString ClearCasePlugin::findTopLevel(const QString &directory) const return topLevel; // Dynamic view - if (directory.startsWith(m_topLevel) && directory.at(m_topLevel.size()) == QLatin1Char('/')) - return m_topLevel; bool isDynamic; ccGetView(directory, &isDynamic); if (isDynamic) { |