From 397be7768575470a679026ae274cbd22e39fd091 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Fri, 16 Aug 2013 11:54:28 -0700 Subject: [PATCH] use a cmp sort instead of a <=> sort, because that's what merge does Add slightly more useful debugging output when we fail from this error Fixes #719839 --- Debbugs/Status.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Debbugs/Status.pm b/Debbugs/Status.pm index bf3d2ab..b28ff53 100644 --- a/Debbugs/Status.pm +++ b/Debbugs/Status.pm @@ -512,12 +512,14 @@ sub lock_read_all_merged_bugs { push @data,$newdata; # perform a sanity check to make sure that the merged bugs # are all merged with eachother - my $expectmerge= join(' ',grep {$_ != $bug } sort { $a <=> $b } @bugs); + # We do a cmp sort instead of an <=> sort here, because that's + # what merge does + my $expectmerge= join(' ',grep {$_ != $bug } sort @bugs); if ($newdata->{mergedwith} ne $expectmerge) { for (1..$locks) { unfilelock(exists $param{locks}?$param{locks}:()); } - die "Bug $param{bug} differs from bug $bug: ($newdata->{bug_num}: '$newdata->{mergedwith}') vs. ('$expectmerge') (".join(' ',@bugs).")"; + die "Bug $param{bug} mergedwith differs from bug $bug: ($newdata->{bug_num}: '$newdata->{mergedwith}') vs. ('$expectmerge') (".join(' ',@bugs).")"; } } } -- 2.39.2