Commit b55dcc29 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

ClearCase: Fix top level optimization for unix



Also use the optimization for snapshot views as well.

Change-Id: Ic8c2d9f874f09b6b3b4a50eb8c5d396f10ecd6cd
Reviewed-by: default avatarKnut Petter Svendsen <knutpett@pvv.org>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 34354148
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment