Assume any new email bearing the same part number is either a reply, or a collision from another series and should thus be ignored.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47042 Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/PendingPatchSets.pm | 46 +++++++++++---------- 1 file changed, 24 insertions(+), 22 deletions(-)
diff --git a/testbot/lib/WineTestBot/PendingPatchSets.pm b/testbot/lib/WineTestBot/PendingPatchSets.pm index adabf2e6c1..cfa6dc0e59 100644 --- a/testbot/lib/WineTestBot/PendingPatchSets.pm +++ b/testbot/lib/WineTestBot/PendingPatchSets.pm @@ -243,50 +243,52 @@ sub NewSubmission($$$)
my $Parts = $Set->Parts; my $Part = $Parts->GetItem($SubjectInfo->{PartNo}); - if (! defined($Part)) + if ($Part) { - $Part = $Parts->Add(); - $Part->No($SubjectInfo->{PartNo}); + $Patch->Disposition("Existing part reply / collision"); + return undef; }
+ $Part = $Parts->Add(); + $Part->No($SubjectInfo->{PartNo}); $Part->Patch($Patch);
my ($_ErrKey, $_ErrProperty, $ErrMessage) = $self->Save(); if (defined($ErrMessage)) { $Patch->Disposition("Error occurred during series processing"); + return undef; }
if (! $Set->CheckSubsetComplete($SubjectInfo->{PartNo})) { $Patch->Disposition("Set not complete yet"); + return undef; } - else + + my $PartNo = $SubjectInfo->{PartNo}; + my $AllPartsAvailable = 1; + while ($PartNo <= $Set->TotalParts && $AllPartsAvailable && + !defined $ErrMessage) { - my $PartNo = $SubjectInfo->{PartNo}; - my $AllPartsAvailable = 1; - while ($PartNo <= $Set->TotalParts && $AllPartsAvailable && - ! defined($ErrMessage)) + my $Part = $Parts->GetItem($PartNo); + if (defined $Part) { - my $Part = $Parts->GetItem($PartNo); - if (defined($Part)) + $ErrMessage = $Set->SubmitSubset($PartNo, $Part->Patch); + if (!defined $ErrMessage) { - $ErrMessage = $Set->SubmitSubset($PartNo, $Part->Patch); - if (!defined $ErrMessage) - { - ($_ErrProperty, $ErrMessage) = $Part->Patch->Save(); - } + ($_ErrProperty, $ErrMessage) = $Part->Patch->Save(); } - else - { - $AllPartsAvailable = !1; - } - $PartNo++; } - if ($AllPartsAvailable && ! defined($ErrMessage)) + else { - $self->DeleteItem($Set); + $AllPartsAvailable = !1; } + $PartNo++; + } + if ($AllPartsAvailable && ! defined($ErrMessage)) + { + $self->DeleteItem($Set); }
return $ErrMessage;