Skip to content
Snippets Groups Projects
Commit ace663a5 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Mercurial: Properly cleanup commit message


Change-Id: If035d3a2476408d3c54aa30f9b276bc5921845b3
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent 0ee23c23
No related branches found
No related tags found
No related merge requests found
......@@ -151,5 +151,14 @@ QString MercurialCommitWidget::repoRoot()
return mercurialCommitPanelUi.repositoryLabel->text();
}
QString MercurialCommitWidget::cleanupDescription(const QString &input) const
{
const QRegularExpression commentLine(QLatin1String("^HG:[^\\n]*(\\n|$)"),
QRegularExpression::MultilineOption);
QString message = input;
message.remove(commentLine);
return message;
}
} // namespace Internal
} // namespace Mercurial
......@@ -53,6 +53,9 @@ public:
QString committer();
QString repoRoot();
protected:
QString cleanupDescription(const QString &input) const;
private:
QWidget *mercurialCommitPanel;
Ui::MercurialCommitPanel mercurialCommitPanelUi;
......
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