Module: tools
Branch: master
Commit: ebea482465c96b13ed5d4a4be6fb64919bc469ff
URL: https://source.winehq.org/git/tools.git/?a=commit;h=ebea482465c96b13ed5d4a4…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Jun 24 16:25:29 2022 +0200
testbot: Sort failures on their notes as a last resort.
Sometimes a bug is spread across multiple failures and the Notes field
normally describes what each one corresponds to. Sorting on the Notes
field as a last resort typically ensures that all the parts are in an
order that makes sense.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/Failures.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/testbot/lib/WineTestBot/Failures.pm b/testbot/lib/WineTestBot/Failures.pm
index dc307bfa..6190ef25 100644
--- a/testbot/lib/WineTestBot/Failures.pm
+++ b/testbot/lib/WineTestBot/Failures.pm
@@ -50,11 +50,11 @@ sub Compare($$)
# Sort deleted entries last
my %StatusOrders = ("deleted" => 1);
- my $Cmp = ($StatusOrders{$self->GetColValue("BugStatus")} || 0) <=> ($StatusOrders{$B->GetColValue("BugStatus")} || 0) ||
+ return ($StatusOrders{$self->GetColValue("BugStatus")} || 0) <=> ($StatusOrders{$B->GetColValue("BugStatus")} || 0) ||
$self->GetColValue("ErrorGroup") cmp $B->GetColValue("ErrorGroup") ||
$self->GetColValue("TestUnit") cmp $B->GetColValue("TestUnit") ||
- $self->GetColValue("BugDescription") cmp $B->GetColValue("BugDescription");
- return $Cmp
+ $self->GetColValue("BugDescription") cmp $B->GetColValue("BugDescription") ||
+ $self->GetColValue("Notes") cmp $B->GetColValue("Notes");
}
sub BugId($;$)
Module: tools
Branch: master
Commit: af62ee218ed25a1502490a1017cf53d23cf65307
URL: https://source.winehq.org/git/tools.git/?a=commit;h=af62ee218ed25a1502490a1…
Author: Jeremy White <jwhite(a)codeweavers.com>
Date: Thu Jun 23 22:20:01 2022 -0500
Protect against patches that break the parsing.
A patch that starts with '^From ' in the body
breaks our parsing.
See for example:
https://gitlab.winehq.org/wine/wine/-/merge_requests/307/diffs?commit_id=5f…
This change doesn't make it work perfectly, but keeps
us from failing, and spamming the mailing list.
---
gitlab/gitlab-to-mail/gitlabtomail.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gitlab/gitlab-to-mail/gitlabtomail.py b/gitlab/gitlab-to-mail/gitlabtomail.py
index e113eaae..8333588e 100755
--- a/gitlab/gitlab-to-mail/gitlabtomail.py
+++ b/gitlab/gitlab-to-mail/gitlabtomail.py
@@ -628,6 +628,10 @@ def process_mr(mr, update_db):
for nr, mail in enumerate(patches):
# The hope is that a slight delay will allow receivers to order the patches correctly.
time.sleep(0.1)
+ if mail['From'] == None:
+ log(f"Error: MR {iid} patch {nr} has no From")
+ continue
+
fixup_patch(mail, iid, version, nr+1)
date = date + datetime.timedelta(seconds=1)
fixup_date(mail, date)