}
}
+=head1
+Inspect the current set of topics
+
+Returns a hash:
+
+ $topic = {
+ $branchname => {
+ 'tipdate' => date of the tip commit,
+ 'desc' => description string,
+ 'log' => [ $commit,... ],
+ },
+ }
+
+=cut
+
sub get_commit {
my (@base) = qw(master next pu);
my $fh;
$sd->{$old_new_topics} = $sd->{$new_topics};
}
$sd->{$new_topics} = [];
-
- # Drop "Graduated"
- for ($i = 0; $i < @{$sl}; $i++) {
- last if ($sl->[$i] eq $graduated)
- }
- if ($i < @{$sl}) {
- splice(@{$sl}, $i, 1);
- $sd->{$graduated} = [];
- }
}
+
+ return $incremental;
}
sub merge_cooking {
my $sl = $cooking->{'section_list'};
my (@new_topic, @gone_topic);
+ # Make sure "New Topics" and "Graduated" exists
if (!exists $sd->{$new_topics}) {
$sd->{$new_topics} = [];
unshift @{$sl}, $new_topics;
unshift @{$sl}, $graduated;
}
- update_issue($cooking);
+ my $incremental = update_issue($cooking);
for my $topic (sort keys %{$current}) {
if (!exists $td->{$topic}) {
for my $topic (sort keys %{$td}) {
next if ($topic eq $blurb);
+ next if (!$incremental &&
+ grep { $topic eq $_ } @{$sd->{$graduated}});
if (!exists $current->{$topic}) {
push @gone_topic, $topic;
}
$td->{$_}{'desc'} = $current->{$_}{'desc'};
}
+ if (!$incremental) {
+ $sd->{$graduated} = [];
+ }
+
if (@gone_topic) {
for my $topic (@gone_topic) {
for my $section (@{$sl}) {
+ my $pre = scalar(@{$sd->{$section}});
@{$sd->{$section}} = (grep { $_ ne $topic }
@{$sd->{$section}});
+ my $post = scalar(@{$sd->{$section}});
+ next if ($pre == $post);
}
}
for (@gone_topic) {
push @{$sd->{$graduated}}, $_;
}
}
-
}
################################################################