forked from qt-creator/qt-creator
Add support for Subversion 1.7
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com> Change-Id: Ide2c13f0e69f9807995539b2634ecec216125d5c Merge-request: 405 Task-number: QTCREATORBUG-6313 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
d34dd1410e
commit
44a18e30a1
@@ -1357,9 +1357,13 @@ QString SubversionPlugin::vcsGetRepositoryURL(const QString &directory)
|
||||
return QString();
|
||||
}
|
||||
|
||||
/* Subversion has ".svn" directory in each directory
|
||||
/* Subversion < 1.7 has ".svn" directory in each directory
|
||||
* it manages. The top level is the first directory
|
||||
* under the directory that does not have a ".svn". */
|
||||
* under the directory that does not have a ".svn".
|
||||
*
|
||||
* Subversion >= 1.7 has ".svn" directory in the root of the
|
||||
* working copy. The top level is the root of the working copy
|
||||
* containg ".svn". */
|
||||
bool SubversionPlugin::managesDirectory(const QString &directory, QString *topLevel /* = 0 */) const
|
||||
{
|
||||
const QDir dir(directory);
|
||||
@@ -1383,6 +1387,18 @@ bool SubversionPlugin::managesDirectory(const QString &directory, QString *topLe
|
||||
}
|
||||
}
|
||||
} while (false);
|
||||
// Subversion >= 1.7: Check for first parent containing ".svn"
|
||||
if (!manages) {
|
||||
QDir parentDir = dir;
|
||||
while (parentDir.cdUp()) {
|
||||
if (checkSVNSubDir(parentDir)) {
|
||||
manages = true;
|
||||
if (topLevel)
|
||||
*topLevel = parentDir.absolutePath();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Subversion::Constants::debug) {
|
||||
QDebug nsp = qDebug().nospace();
|
||||
nsp << "SubversionPlugin::managesDirectory" << directory << manages;
|
||||
|
Reference in New Issue
Block a user