forked from qt-creator/qt-creator
Subversion: Bump minimum subversion version to 1.7.0 or later
Change-Id: Iaca84fb6b5c218f37ce415e72d409893c2306254 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
\row
|
||||
\li Subversion
|
||||
\li \l{http://subversion.apache.org/}
|
||||
\li Subversion version 1.6.17 and later
|
||||
\li Subversion version 1.7.0 and later
|
||||
\endtable
|
||||
|
||||
\section1 Setting Up Version Control Systems
|
||||
|
@@ -234,11 +234,7 @@ void SubversionClient::diff(const QString &workingDir, const QStringList &files,
|
||||
const QStringList &extraOptions)
|
||||
{
|
||||
QStringList args(extraOptions);
|
||||
Version v = svnVersion();
|
||||
|
||||
// --internal-diff is new in v1.7.0
|
||||
if (v.majorVersion > 1 || (v.majorVersion == 1 && v.minorVersion >= 7))
|
||||
args.append(QLatin1String("--internal-diff"));
|
||||
args.append(QLatin1String("--internal-diff"));
|
||||
|
||||
const bool hasAuth = settings()->hasAuthentication();
|
||||
const QString userName = hasAuth ? settings()->stringValue(SubversionSettings::userKey) : QString();
|
||||
|
@@ -1188,7 +1188,7 @@ bool SubversionPlugin::managesDirectory(const QString &directory, QString *topLe
|
||||
* parents may be svn:externals. */
|
||||
QDir parentDir = dir;
|
||||
while (!parentDir.isRoot()) {
|
||||
if (checkSVNSubDir(parentDir, QLatin1String("wc.db"))) {
|
||||
if (checkSVNSubDir(parentDir)) {
|
||||
if (topLevel)
|
||||
*topLevel = parentDir.absolutePath();
|
||||
return true;
|
||||
@@ -1197,24 +1197,7 @@ bool SubversionPlugin::managesDirectory(const QString &directory, QString *topLe
|
||||
break;
|
||||
}
|
||||
|
||||
/* 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".*/
|
||||
if (!checkSVNSubDir(dir))
|
||||
return false;
|
||||
|
||||
if (topLevel) {
|
||||
QDir lastDirectory = dir;
|
||||
for (parentDir = lastDirectory;
|
||||
!parentDir.isRoot() && parentDir.cdUp();
|
||||
lastDirectory = parentDir) {
|
||||
if (!checkSVNSubDir(parentDir)) {
|
||||
*topLevel = lastDirectory.absolutePath();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool SubversionPlugin::managesFile(const QString &workingDirectory, const QString &fileName) const
|
||||
@@ -1227,14 +1210,14 @@ bool SubversionPlugin::managesFile(const QString &workingDirectory, const QStrin
|
||||
}
|
||||
|
||||
// Check whether SVN management subdirs exist.
|
||||
bool SubversionPlugin::checkSVNSubDir(const QDir &directory, const QString &fileName) const
|
||||
bool SubversionPlugin::checkSVNSubDir(const QDir &directory) const
|
||||
{
|
||||
const int dirCount = m_svnDirectories.size();
|
||||
for (int i = 0; i < dirCount; i++) {
|
||||
const QDir svnDir(directory.absoluteFilePath(m_svnDirectories.at(i)));
|
||||
if (!svnDir.exists())
|
||||
continue;
|
||||
if (!fileName.isEmpty() && !svnDir.exists(fileName))
|
||||
if (!svnDir.exists(QLatin1String("wc.db")))
|
||||
continue;
|
||||
return true;
|
||||
}
|
||||
|
@@ -152,7 +152,7 @@ private:
|
||||
bool enableAnnotationContextMenu = false);
|
||||
void svnStatus(const QString &workingDir, const QString &relativePath = QString());
|
||||
void svnUpdate(const QString &workingDir, const QString &relativePath = QString());
|
||||
bool checkSVNSubDir(const QDir &directory, const QString &fileName = QString()) const;
|
||||
bool checkSVNSubDir(const QDir &directory) const;
|
||||
void startCommit(const QString &workingDir, const QStringList &files = QStringList());
|
||||
inline SubversionControl *subVersionControl() const;
|
||||
|
||||
|
Reference in New Issue
Block a user