diff options
| author | Peter Penz <[email protected]> | 2009-07-30 21:22:14 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-07-30 21:22:14 +0000 |
| commit | b74958854cfa44609185357b67f174b8657551a1 (patch) | |
| tree | 28763fcfc8faa397f8fdf3e384ce6c01ed3ea5da | |
| parent | 99cdb9d5baa12a94c36492e4ad076860690158f2 (diff) | |
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
| -rw-r--r-- | src/revisioncontrolplugin.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
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 <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.")); |
