Module: tools
Branch: master
Commit: 1b867cb3e46155e7d85c7c629980093c1d768b22
URL: https://source.winehq.org/git/tools.git/?a=commit;h=1b867cb3e46155e7d85c7c6…
Author: Jeremy White <jwhite(a)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']
Module: tools
Branch: master
Commit: 5156da1e4b7bc8fa34f85784ddf7084b28f6284b
URL: https://source.winehq.org/git/tools.git/?a=commit;h=5156da1e4b7bc8fa34f8578…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Jun 7 18:49:39 2022 +0200
testbot/cgi: Don't pass the master columns to the details pages.
The details pages have no way to pass the master columns to the
collection used to retrieve the Item to display: what they would need
instead is a master object. So they don't even try to retrieve the
master column values from the parameters (see *Param() in the FormPage
and ItemPage classes).
Fortunately so far there is no case where we need this functionality.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/ObjectModel/CGI/CollectionBlock.pm | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
diff --git a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
index e8156a1..7d42ba2 100644
--- a/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
+++ b/testbot/lib/ObjectModel/CGI/CollectionBlock.pm
@@ -240,15 +240,6 @@ sub GetDetailsLink($$)
if (!$Row->{DetailsLink})
{
$Row->{DetailsLink} = "$Row->{DetailsPage}?Key=". uri_escape($Row->{Item}->GetKey());
- my ($MasterColNames, $MasterColValues) = $Row->{Item}->GetMasterCols();
- if (defined $MasterColNames)
- {
- foreach my $ColIndex (0..$#{$MasterColNames})
- {
- $Row->{DetailsLink} .= "&". $MasterColNames->[$ColIndex] ."=".
- uri_escape($MasterColValues->[$ColIndex]);
- }
- }
}
return $Row->{DetailsLink};
}
@@ -680,17 +671,7 @@ sub OnAction($$)
if ($self->{RW} and $Action eq $self->GetAddButtonLabel())
{
- my $Target = $self->GetDetailsPage();
- my ($MasterColNames, $MasterColValues) = $self->{Collection}->GetMasterCols();
- if (defined($MasterColNames))
- {
- foreach my $ColIndex (0..$#{$MasterColNames})
- {
- $Target .= ($ColIndex == 0 ? "?" : "&") . $MasterColNames->[$ColIndex] .
- "=" . uri_escape($MasterColValues->[$ColIndex]);
- }
- }
- exit($self->{EnclosingPage}->Redirect($Target));
+ exit($self->{EnclosingPage}->Redirect($self->GetDetailsPage()));
}
foreach my $Key (@{$self->{Collection}->GetKeys()})