Meta/cook -w: catch "stalled" category as well
Junio C Hamano committed
Jan 23, 2012 at 16:53 UTC
e1c8da09e49980e1c02a849c9f906733ba203e62
1 file changed
+13
-3
cook
+13
-3
@@ -629,15 +629,20 @@ sub wildo_queue {
629
}
630
631
sub wildo {
632
- my (%what, $topic, $last_merge_to_next);
632
+ my (%what, $topic, $last_merge_to_next, $in_stalled);
633
my $too_recent = '9999-99-99';
634
while (<>) {
635
chomp;
636
637
next if (/^\[Graduated to/../^-{20,}$/);
638
- next if (/^\[Stalled\]/../^-{20,}$/);
638
next if (/^\[Discarded\]/../^-{20,}$/);
639
640
+ if (/^\[Stalled\]/../^-{20,}$/) {
641
+ $in_stalled = 1;
642
+ } else {
643
+ $in_stalled = 0;
644
+ }
645
+
646
if (/^\* (\S+) \(([-0-9]+)\) (\d+) commits?$/) {
647
if (defined $topic) {
648
wildo_queue(\%what, "Undecided", $topic);
@@ -657,7 +662,12 @@ sub wildo {
662
}
663
next if (/^ /);
664
next unless defined $topic;
660
- if (/^Will (?:\S+ ){0,2}(keep|merge|drop|discard|cook|kick)[,. ]/ ||
665
+
666
+ if ($in_stalled) {
667
+ wildo_queue(\%what, "Stalled", $topic);
668
+ $topic = undef;
669
+ }
670
+ if (/^Will (?:\S+ ){0,2}(keep|merge|drop|discard|cook|kick|defer)[,. ]/ ||
671
/^Not urgent/ || /^Not ready/ || /^Waiting for / ||
672
/^Needs? / || /Expecting /) {
673
wildo_queue(\%what, $_, $topic);