Opened on 05/25/2016 at 12:54:56 PM
Closed on 05/27/2016 at 08:16:39 AM
#4070 closed defect (fixed)
Mercurial commit hook produces broken markup if the commit message is more than one line long
Reported by: | kvas | Assignee: | kvas |
---|---|---|---|
Priority: | P3 | Milestone: | |
Module: | Sitescripts | Keywords: | |
Cc: | kzar, sebastian | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | yes | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description (last modified by kvas)
Environment
The issue affects mercurial commit hook installed on most repositories of hg.adblockplus.org.
How to reproduce
Create and push a commit that references an issue with multiline commit message.
Observed behaviour
The comment that is created in the issue has broken markup. See for example this comment in #4057.
Expected behaviour
Only the first line of the commit message should be used to render the link in the issue comment. If the second line is non-empty, an ellipsis ("...") should be added to the first line to indicate that there's a continuation (if the last character of the first line is a period, it should be replaced with the ellipsis instead). If the second line is empty, the first line is assumed to be a short summary of the whole commit message and the ellipsis should not be added.
Attachments (0)
Change History (7)
comment:1 Changed on 05/25/2016 at 01:14:59 PM by sebastian
comment:2 Changed on 05/25/2016 at 04:02:37 PM by kvas
- Description modified (diff)
You're right. Issue updated.
comment:3 Changed on 05/25/2016 at 04:06:02 PM by sebastian
- Priority changed from Unknown to P3
- Ready set
comment:4 Changed on 05/25/2016 at 05:15:28 PM by kvas
- Owner set to kvas
comment:5 Changed on 05/25/2016 at 05:15:41 PM by kvas
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:6 Changed on 05/27/2016 at 08:15:08 AM by abpbot
A commit referencing this issue has landed:
Fixes 4070 - Correctly handle multiline commit messages in the mercurial hook
comment:7 Changed on 05/27/2016 at 08:16:39 AM by kvas
- Resolution set to fixed
- Status changed from reviewing to closed
There are two kind of multiline commit messages:
I think as for 1. we should replace the subsequent line with an ellipsis to indicate that there is more, otherwise it reads weird or the commit message might even be misinterpreted. However for 2. I think we can simply omit the subsequent lines without any indication. Do you agree, or do I overthink it?