diff options
author | cerf <delorme.hugues@gmail.com> | 2011-03-18 09:55:36 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2011-03-18 09:56:49 +0100 |
commit | d87f03825daedd16c24b949a3c815c4435100e27 (patch) | |
tree | e5f7cd0450aaac0fc9f7f6c81f311da84197ebbf /src/plugins/bazaar/bazaarplugin.cpp | |
parent | 750248f3e88d4c272302ac4218e5ad9b7de8b316 (diff) | |
download | qt-creator-d87f03825daedd16c24b949a3c815c4435100e27.tar.gz |
Bazaar: fix commit error for 'rename' changes
Merge-request: 276
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Diffstat (limited to 'src/plugins/bazaar/bazaarplugin.cpp')
-rw-r--r-- | src/plugins/bazaar/bazaarplugin.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/bazaar/bazaarplugin.cpp b/src/plugins/bazaar/bazaarplugin.cpp index 182ac08a3f..c9c2a5a726 100644 --- a/src/plugins/bazaar/bazaarplugin.cpp +++ b/src/plugins/bazaar/bazaarplugin.cpp @@ -627,13 +627,21 @@ bool BazaarPlugin::submitEditorAboutToClose(VCSBase::VCSBaseSubmitEditor *submit break; } - const QStringList files = commitEditor->checkedFiles(); + QStringList files = commitEditor->checkedFiles(); if (!files.empty()) { //save the commit message m_core->fileManager()->blockFileChange(editorFile); editorFile->save(); m_core->fileManager()->unblockFileChange(editorFile); + //rewrite entries of the form 'file => newfile' to 'newfile' because + //this would mess the commit command + for (QStringList::iterator iFile = files.begin(); iFile != files.end(); ++iFile) { + const QStringList parts = iFile->split(" => ", QString::SkipEmptyParts); + if (!parts.isEmpty()) + *iFile = parts.last(); + } + const BazaarCommitWidget* commitWidget = commitEditor->commitWidget(); BazaarClient::ExtraCommandOptions extraOptions; extraOptions[BazaarClient::AuthorCommitOptionId] = commitWidget->committer(); |