From: Peter Penz Date: Thu, 30 Jul 2009 21:22:14 +0000 (+0000) Subject: Use "svn commit -F" instead of "svn commit -m" to provide a commit description, other... X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/b74958854cfa44609185357b67f174b8657551a1 Use "svn commit -F" instead of "svn commit -m" to provide a commit description, otherwise line-break, quotes etc. don't work in comments. Tested with local SVN repository, I hope everything works now too with this official commit... svn path=/trunk/KDE/kdebase/apps/; revision=1004788 --- diff --git a/src/revisioncontrolplugin.cpp b/src/revisioncontrolplugin.cpp index 905b91380..77a7b1290 100644 --- a/src/revisioncontrolplugin.cpp +++ b/src/revisioncontrolplugin.cpp @@ -40,6 +40,7 @@ RevisionControlPlugin::~RevisionControlPlugin() #include #include #include +#include #include #include #include @@ -272,8 +273,19 @@ void SubversionPlugin::commitFiles() dialog.restoreDialogSize(dialogConfig); if (dialog.exec() == QDialog::Accepted) { - const QString description = editor->toPlainText(); - execSvnCommand("commit -m " + KShell::quoteArg(description), + // write the commit description into a temporary file, so + // that it can be read by the command "svn commit -F" + QFile file(QDir::tempPath() + "/svn_commit_descr.txt"); + if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { + emit errorMessage(i18nc("@info:status", "Commit of SVN changes failed.")); + return; + } + + QTextStream out(&file); + out << editor->toPlainText(); + file.close(); + + execSvnCommand("commit -F " + KShell::quoteArg(file.fileName()), i18nc("@info:status", "Committing SVN changes..."), i18nc("@info:status", "Commit of SVN changes failed."), i18nc("@info:status", "Committed SVN changes."));