Module: tools Branch: master Commit: 1b867cb3e46155e7d85c7c629980093c1d768b22 URL: https://source.winehq.org/git/tools.git/?a=commit;h=1b867cb3e46155e7d85c7c62...
Author: Jeremy White jwhite@codeweavers.com Date: Mon Jun 6 16:04:51 2022 -0500
Avoid extra quoting if the current note is quoted.
If you look at: https://www.winehq.org/pipermail/wine-devel/2022-May/217121.html and compare with the merge request itself, you can see that the combined quotes create a deceptive looking trail on the mailing list.
This is event 1549 on the winehq gitlab.
---
gitlab/gitlab-to-mail/gitlabtomail.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gitlab/gitlab-to-mail/gitlabtomail.py b/gitlab/gitlab-to-mail/gitlabtomail.py index d426cc9..e113eaa 100755 --- a/gitlab/gitlab-to-mail/gitlabtomail.py +++ b/gitlab/gitlab-to-mail/gitlabtomail.py @@ -339,8 +339,11 @@ def process_commented_on(event):
# If we are part of a thread, naively quote the last comment # this seems slightly improve reported context. + # Unless the commentor has already injected some quoting, in which + # case let's trust them to get it right. + quoting = len(event['note']['body']) > 0 and event['note']['body'][0] == '>' original = find_original_comment(event['note']['noteable_iid'], event['note']['id']) - if original: + if original and not quoting: body += quote_original_comment(original)
body += event['note']['body']