}
# if the found we are adding matches any fixed
# versions, remove them
- my @temp = grep m{(^|/)\Q$sver\E}, keys %fixed_versions;
+ my @temp = grep m{(^|/)\Q$sver\E$}, keys %fixed_versions;
delete $fixed_versions{$_} for @temp;
$fixed_removed{$_} = 1 for @temp;
}
# in the case of removal, we only concern ourself with
# the version passed, not the source version it maps
# to
- my @temp = grep m{(^|/)\Q$version\E}, keys %found_versions;
+ my @temp = grep m{(?:^|/)\Q$version\E$}, keys %found_versions;
delete $found_versions{$_} for @temp;
$found_removed{$_} = 1 for @temp;
}
$locks--;
}
__end_control(%info);
- for my $change (values %{$changes}, @{$disallowed_changes}) {
+ for my $change ((map {@{$_}} values %{$changes}), @{$disallowed_changes}) {
print {$transcript} "$change->{field} of #$change->{bug} is '$change->{text_orig_value}' not '$change->{text_value}'\n";
}
die "Unable to modify bugs so they could be merged";
@{$merge_status{"${_}_versions"}}{@{$data->{"${_}_versions"}}} = (1) x @{$data->{"${_}_versions"}};
}
}
+ # if there is a non-source qualified version with a corresponding
+ # source qualified version, we only want to merge the source
+ # qualified version(s)
+ for (qw(fixed found)) {
+ my @unqualified_versions = grep {m{/}?0:1} keys %{$merge_status{"${_}_versions"}};
+ for my $unqualified_version (@unqualified_versions) {
+ if (grep {m{/\Q$unqualified_version\E}} keys %{$merge_status{"${_}_versions"}}) {
+ delete $merge_status{"${_}_versions"}{$unqualified_version};
+ }
+ }
+ }
return (\%merge_status,$bugs_to_merge);
}