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
This commit is contained in:
Peter Penz 2009-07-30 21:22:14 +00:00
parent 99cdb9d5ba
commit b74958854c

View file

@ -40,6 +40,7 @@ RevisionControlPlugin::~RevisionControlPlugin()
#include <kshell.h>
#include <kvbox.h>
#include <QDir>
#include <QFile>
#include <QLabel>
#include <QProcess>
#include <QString>
@ -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."));