Skip to content
Snippets Groups Projects
Commit d87f0382 authored by cerf's avatar cerf Committed by Tobias Hunger
Browse files

Bazaar: fix commit error for 'rename' changes


Merge-request: 276
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 750248f3
No related branches found
No related tags found
No related merge requests found
...@@ -627,13 +627,21 @@ bool BazaarPlugin::submitEditorAboutToClose(VCSBase::VCSBaseSubmitEditor *submit ...@@ -627,13 +627,21 @@ bool BazaarPlugin::submitEditorAboutToClose(VCSBase::VCSBaseSubmitEditor *submit
break; break;
} }
const QStringList files = commitEditor->checkedFiles(); QStringList files = commitEditor->checkedFiles();
if (!files.empty()) { if (!files.empty()) {
//save the commit message //save the commit message
m_core->fileManager()->blockFileChange(editorFile); m_core->fileManager()->blockFileChange(editorFile);
editorFile->save(); editorFile->save();
m_core->fileManager()->unblockFileChange(editorFile); 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(); const BazaarCommitWidget* commitWidget = commitEditor->commitWidget();
BazaarClient::ExtraCommandOptions extraOptions; BazaarClient::ExtraCommandOptions extraOptions;
extraOptions[BazaarClient::AuthorCommitOptionId] = commitWidget->committer(); extraOptions[BazaarClient::AuthorCommitOptionId] = commitWidget->committer();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment