Commit 44a18e30 authored by Jonathan Liu's avatar Jonathan Liu Committed by Tobias Hunger

Add support for Subversion 1.7

Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
Change-Id: Ide2c13f0e69f9807995539b2634ecec216125d5c
Merge-request: 405
Task-number: QTCREATORBUG-6313
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent d34dd141
...@@ -1357,9 +1357,13 @@ QString SubversionPlugin::vcsGetRepositoryURL(const QString &directory) ...@@ -1357,9 +1357,13 @@ QString SubversionPlugin::vcsGetRepositoryURL(const QString &directory)
return QString(); 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 * 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 bool SubversionPlugin::managesDirectory(const QString &directory, QString *topLevel /* = 0 */) const
{ {
const QDir dir(directory); const QDir dir(directory);
...@@ -1383,6 +1387,18 @@ bool SubversionPlugin::managesDirectory(const QString &directory, QString *topLe ...@@ -1383,6 +1387,18 @@ bool SubversionPlugin::managesDirectory(const QString &directory, QString *topLe
} }
} }
} while (false); } 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) { if (Subversion::Constants::debug) {
QDebug nsp = qDebug().nospace(); QDebug nsp = qDebug().nospace();
nsp << "SubversionPlugin::managesDirectory" << directory << manages; nsp << "SubversionPlugin::managesDirectory" << directory << manages;
......
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