Commit 3fb84565 authored by Nikolai Krasheninnikov's avatar Nikolai Krasheninnikov Committed by Méven Car
Browse files

Added SVN add/delete/revert directory.

Added "SVN Add" on directory addition with appropriate "SVN Revert" action.
Also for directories already under VCS control added "SVN Delete" action.

Test Plan:
1. Create empty directory.
2. Try "SVN Add" on it: it should be added.
3. Try "SVN Revert" on it: it should be reverted.
4. Try "SVN Add", then "SVN Commit". It should be commited fine.
5. Try "SVN Delete", then "SVN Commit". It should be deleted from CVS and commited fine.
6. Try the same with a dir with an empty file in it right-clicking on the directory name and inside directory.

Reviewers: meven, elvisangelaccio

Reviewed By: meven

Differential Revision:
parent 31c122b6
......@@ -396,7 +396,14 @@ void FileViewSvnPlugin::removeFiles()
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."));
......@@ -573,10 +580,14 @@ QList<QAction*> FileViewSvnPlugin::directoryActions(const KFileItem& directory)
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) {
} else {
QList<QAction*> actions;
......@@ -584,6 +595,9 @@ QList<QAction*> FileViewSvnPlugin::directoryActions(const KFileItem& directory)
return actions;
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