forked from qt-creator/qt-creator
VCS[git/hg]: Prevent search for repository from creating folders
... when autofs is involved. Check for files instead of folders and stop checking/recursing up at '/' or $HOME. Further fixup will follow. Task-number: QTCREATORBUG-1361 Task-number: QTBUG-10495
This commit is contained in:
@@ -556,15 +556,10 @@ void MercurialClient::commit(const QString &repositoryRoot, const QStringList &f
|
||||
|
||||
QString MercurialClient::findTopLevelForFile(const QFileInfo &file)
|
||||
{
|
||||
const QString repositoryTopDir = QLatin1String(Constants::MECURIALREPO);
|
||||
QDir dir = file.isDir() ? QDir(file.absoluteFilePath()) : QDir(file.absolutePath());
|
||||
|
||||
do {
|
||||
if (QFileInfo(dir, repositoryTopDir).exists())
|
||||
return dir.absolutePath();
|
||||
} while (dir.cdUp());
|
||||
|
||||
return QString();
|
||||
const QString repositoryCheckFile = QLatin1String(Constants::MECURIALREPO) + QLatin1String("/requires");
|
||||
return file.isDir() ?
|
||||
VCSBase::VCSBasePlugin::findRepositoryForDirectory(file.absoluteFilePath(), repositoryCheckFile) :
|
||||
VCSBase::VCSBasePlugin::findRepositoryForDirectory(file.absolutePath(), repositoryCheckFile);
|
||||
}
|
||||
|
||||
void MercurialClient::settingsChanged()
|
||||
|
Reference in New Issue
Block a user