From 1e3f0ccee90efee6612d43e0b7f734790ca564b1 Mon Sep 17 00:00:00 2001 From: John Dancel Date: May 14 2019 02:14:53 +0000 Subject: Fix for SVN 1.7+ changes --- diff --git a/toonz/sources/toonz/dvdirtreeview.cpp b/toonz/sources/toonz/dvdirtreeview.cpp index 6ea0350..a3070cd 100644 --- a/toonz/sources/toonz/dvdirtreeview.cpp +++ b/toonz/sources/toonz/dvdirtreeview.cpp @@ -1373,11 +1373,11 @@ void DvDirTreeView::onRefreshStatusError(const QString &text) { void DvDirTreeView::checkPartialLock(const QString &workingDir, const QStringList &files) { QStringList args; - args << "propget"; - args << "partial-lock"; + args << "proplist"; int filesCount = files.count(); for (int i = 0; i < filesCount; i++) args << files.at(i); args << "--xml"; + args << "-v"; m_thread.disconnect(SIGNAL(done(const QString &))); m_thread.disconnect(SIGNAL(error(const QString &))); diff --git a/toonz/sources/toonz/svncommitdialog.cpp b/toonz/sources/toonz/svncommitdialog.cpp index e3bfeb1..fd3c644 100644 --- a/toonz/sources/toonz/svncommitdialog.cpp +++ b/toonz/sources/toonz/svncommitdialog.cpp @@ -1041,10 +1041,10 @@ void SVNCommitFrameRangeDialog::onLockDone() { // Step 3: propget QStringList args; - args << "propget"; - args << "partial-lock"; + args << "proplist"; args << m_file; args << "--xml"; + args << "-v"; m_thread.disconnect(SIGNAL(done(const QString &))); connect(&m_thread, SIGNAL(done(const QString &)), this, diff --git a/toonz/sources/toonz/svnlockframerangedialog.cpp b/toonz/sources/toonz/svnlockframerangedialog.cpp index 9c30517..d8929ad 100644 --- a/toonz/sources/toonz/svnlockframerangedialog.cpp +++ b/toonz/sources/toonz/svnlockframerangedialog.cpp @@ -304,10 +304,10 @@ void SVNLockFrameRangeDialog::onLockDone() { // Step 2: propget QStringList args; - args << "propget"; - args << "partial-lock"; + args << "proplist"; args << m_file; args << "--xml"; + args << "-v"; m_thread.disconnect(SIGNAL(done(const QString &))); connect(&m_thread, SIGNAL(done(const QString &)), this, @@ -736,10 +736,10 @@ void SVNUnlockFrameRangeDialog::onLockDone() { // Step 3: propget QStringList args; - args << "propget"; - args << "partial-lock"; + args << "proplist"; args << m_file; args << "--xml"; + args << "-v"; m_thread.disconnect(SIGNAL(done(const QString &))); connect(&m_thread, SIGNAL(done(const QString &)), this, @@ -1074,10 +1074,10 @@ SVNFrameRangeLockInfoDialog::SVNFrameRangeLockInfoDialog( // 1. propget QStringList args; - args << "propget"; - args << "partial-lock"; + args << "proplist"; args << m_file; args << "--xml"; + args << "-v"; connect(&m_thread, SIGNAL(done(const QString &)), this, SLOT(onPropGetDone(const QString &))); diff --git a/toonz/sources/toonz/versioncontrol.cpp b/toonz/sources/toonz/versioncontrol.cpp index bf8f4cf..1e02c67 100644 --- a/toonz/sources/toonz/versioncontrol.cpp +++ b/toonz/sources/toonz/versioncontrol.cpp @@ -327,8 +327,7 @@ void VersionControlManager::setFrameRange(TLevelSet *levelSet, m_deleteLater = deleteLater; QStringList args; - args << "propget"; - args << "partial-lock"; + args << "proplist"; bool checkVersionControl = false; bool filesAddedToArgs = false; @@ -379,6 +378,7 @@ void VersionControlManager::setFrameRange(TLevelSet *levelSet, } args << "--xml"; + args << "-v"; TFilePath path = m_scene->getScenePath(); path = m_scene->decodeFilePath(path); @@ -612,7 +612,15 @@ bool VersionControl::testSetup() { //----------------------------------------------------------------------------- bool VersionControl::isFolderUnderVersionControl(const QString &folderPath) { QDir dir(folderPath); - return dir.entryList(QDir::AllDirs | QDir::Hidden).contains(".svn"); + if (dir.entryList(QDir::AllDirs | QDir::Hidden).contains(".svn")) return true; + // For SVN 1.7 and greater, check parent directories to see if it's under + // version control + while (dir.cdUp()) { + if (dir.entryList(QDir::AllDirs | QDir::Hidden).contains(".svn")) + return true; + } + + return false; } //----------------------------------------------------------------------------- diff --git a/toonz/sources/toonzlib/tproject.cpp b/toonz/sources/toonzlib/tproject.cpp index 4c270d4..5a1c5d3 100644 --- a/toonz/sources/toonzlib/tproject.cpp +++ b/toonz/sources/toonzlib/tproject.cpp @@ -160,7 +160,15 @@ TFilePath searchProjectPath(TFilePath folder) { bool isFolderUnderVersionControl(const TFilePath &folderPath) { QDir dir(QString::fromStdWString(folderPath.getWideString())); - return dir.entryList(QDir::AllDirs | QDir::Hidden).contains(".svn"); + if (dir.entryList(QDir::AllDirs | QDir::Hidden).contains(".svn")) return true; + // For SVN 1.7 and greater, check parent directories to see if it's under + // version control + while (dir.cdUp()) { + if (dir.entryList(QDir::AllDirs | QDir::Hidden).contains(".svn")) + return true; + } + + return false; } //===================================================================