ClearCase: Fix not detecting that a file is already checked out

ClearCase violates POSIX since it gives a file a new inode when
checked out. This gives QtCreator problems with noticing that
a file has changed permissions to writeable and thus it will
insist on trying to check out the file again in some cases.

Change-Id: Ia3f621daff258b3ea5d9ff4f5cec7629ca46e6bd
Reviewed-by: Knut Petter Svendsen <knutpett@pvv.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Knut Petter Svendsen
2015-01-03 21:44:28 +02:00
parent e1b39f1e35
commit 9e32c1abc1

View File

@@ -47,6 +47,7 @@
#include <coreplugin/actionmanager/command.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/documentmanager.h>
#include <coreplugin/editormanager/documentmodel.h>
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <coreplugin/infobar.h>
@@ -1648,6 +1649,14 @@ bool ClearCasePlugin::vcsOpen(const QString &workingDir, const QString &fileName
&& !m_settings.disableIndexer) {
setStatus(absPath, FileStatus::CheckedOut);
}
foreach (DocumentModel::Entry *e, DocumentModel::entries()) {
if (e->fileName() == absPath) {
e->document->checkPermissions();
break;
}
}
return !response.error;
}
return true;