Meta/cook: retire Old New Topics and send them directly to Cooking
Junio C Hamano committed
Jan 4, 2013 at 15:24 UTC
fcfbf8ee3b89649d0e0b2d6186f5ae3e94d9c6d3
1 file changed
+7
-14
cook
+7
-14
@@ -461,7 +461,7 @@ sub write_cooking {
461
my $graduated = 'Graduated to "master"';
462
my $new_topics = 'New Topics';
463
my $discarded = 'Discarded';
464
-my $old_new_topics = 'Old New Topics';
464
+my $cooking_topics = 'Cooking';
465
466
sub update_issue {
467
my ($cooking) = @_;
@@ -512,20 +512,13 @@ sub update_issue {
512
if (!$incremental) {
513
my $sd = $cooking->{'section_data'};
514
my $sl = $cooking->{'section_list'};
515
- # Rename "New" to "Old New" and insert "New".
516
- # Move "New" to "Old New"
517
- my $i;
518
- my $doneso;
519
- for ($i = 0; $i < @{$sl}; $i++) {
520
- if ($sl->[$i] eq $new_topics) {
521
- $sl->[$i] = $old_new_topics;
522
- unshift @{$sl}, $new_topics;
523
- $doneso = 1;
524
- last;
515
+
516
+ if (exists $sd->{$new_topics}) {
517
+ if (!exists $sd->{$cooking_topics}) {
518
+ $sd->{$cooking_topics} = [];
519
+ unshift @{$sl}, $cooking_topics;
520
}
526
- }
527
- if ($doneso) {
528
- $sd->{$old_new_topics} = $sd->{$new_topics};
521
+ unshift @{$sd->{$cooking_topics}}, @{$sd->{$new_topics}};
522
}
523
$sd->{$new_topics} = [];
524
}