diff --git a/svn/fileviewsvnplugin.cpp b/svn/fileviewsvnplugin.cpp --- a/svn/fileviewsvnplugin.cpp +++ b/svn/fileviewsvnplugin.cpp @@ -473,15 +473,23 @@ void FileViewSvnPlugin::removeFiles() { - execSvnCommand(QLatin1String("remove"), QStringList(), + // Let's add "--keep-local" so files doesn't got removed from drive only from SVN. + execSvnCommand(QLatin1String("remove"), QStringList() << QLatin1String("--keep-local"), i18nc("@info:status", "Removing files from SVN repository..."), i18nc("@info:status", "Removing of files from SVN repository failed."), i18nc("@info:status", "Removed files from SVN repository.")); } void FileViewSvnPlugin::revertFiles() { - execSvnCommand(QStringLiteral("revert"), QStringList(), + QStringList arguments; + + // If we are reverting a directory let's revert everything in it. + if (!m_contextDir.isEmpty()) { + arguments << QLatin1String("--depth") << QLatin1String("infinity"); + } + + execSvnCommand(QStringLiteral("revert"), arguments, i18nc("@info:status", "Reverting files from SVN repository..."), i18nc("@info:status", "Reverting of files from SVN repository failed."), i18nc("@info:status", "Reverted files from SVN repository.")); @@ -572,17 +580,24 @@ const ItemVersion version = itemVersion(directory); m_showLocalChangesAction->setEnabled(enabled && (version != NormalVersion)); + m_addAction->setEnabled(enabled && (version == UnversionedVersion)); + m_removeAction->setEnabled(enabled && (version == NormalVersion)); if (version == LocallyModifiedVersion || version == AddedVersion || version == RemovedVersion) { m_commitAction->setEnabled(enabled); + m_revertAction->setEnabled(enabled); } else { m_commitAction->setEnabled(false); + m_revertAction->setEnabled(false); } QList actions; actions.append(m_updateAction); actions.append(m_showLocalChangesAction); actions.append(m_commitAction); actions.append(m_showUpdatesAction); + actions.append(m_addAction); + actions.append(m_removeAction); + actions.append(m_revertAction); return actions; }