@@ -834,31 +834,16 @@ sub merge_cooking {
834
834
# ###############################################################
835
835
# WilDo
836
836
sub wildo_queue {
837
- my ($what , $action , $topic ) = @_ ;
838
- if (!exists $what -> {$action }) {
839
- $what -> {$action } = [];
840
- }
841
- push @{$what -> {$action }}, $topic ;
842
- }
843
-
844
- sub section_action {
845
- my ($section ) = @_ ;
846
- if ($section ) {
847
- for ($section ) {
848
- return if (/ ^Graduated to/ || / ^Discarded$ / );
849
- return $_ if (/ ^Stalled$ / );
850
- }
851
- }
852
- return " Undecided" ;
853
- }
854
-
855
- sub wildo_flush_topic {
856
837
my ($in_section , $what , $topic ) = @_ ;
857
838
if (defined $topic ) {
858
- my $action = section_action($in_section );
859
- if ($action ) {
860
- wildo_queue($what , $action , $topic );
839
+ for ($in_section ) {
840
+ return if (/ ^Graduated to/ || / ^Discarded$ / );
861
841
}
842
+ my $action = $topic -> [6] || " Under discussion" ;
843
+ if (!exists $what -> {$action }) {
844
+ $what -> {$action } = [];
845
+ }
846
+ push @{$what -> {$action }}, $topic ;
862
847
}
863
848
}
864
849
@@ -883,16 +868,22 @@ sub wildo {
883
868
if (/ ^\[ (.*)\] $ / ) {
884
869
my $old_section = $in_section ;
885
870
$in_section = $1 ;
886
- wildo_flush_topic ($old_section , \%what , $topic );
871
+ wildo_queue ($old_section , \%what , $topic );
887
872
$topic = $in_desc = undef ;
888
873
next ;
889
874
}
890
875
891
876
if (/ ^\* (\S +) \( ([-0-9]+)\) (\d +) commits?$ / ) {
892
- wildo_flush_topic($in_section , \%what , $topic );
893
-
894
- # tip-date, next-date, topic, count, seen-count
895
- $topic = [$2 , $too_recent , $1 , $3 , 0];
877
+ wildo_queue($in_section , \%what , $topic );
878
+
879
+ # [0] tip-date
880
+ # [1] next-date
881
+ # [2] topic
882
+ # [3] count
883
+ # [4] seen-count
884
+ # [5] source
885
+ # [6] action
886
+ $topic = [$2 , $too_recent , $1 , $3 , 0, [], undef ];
896
887
$in_desc = undef ;
897
888
next ;
898
889
}
@@ -922,19 +913,18 @@ sub wildo {
922
913
}
923
914
924
915
if (wildo_match($_ )) {
925
- wildo_queue(\ %what , $_ , $topic ) ;
916
+ $topic -> [6] = $_ ;
926
917
next ;
927
918
}
928
919
929
- if (/ ^source:\s +(.*)$ / ) {
920
+ if (/ ^(?: source:|cf \. ) \s +(.*)$ / ) {
930
921
$topic -> [5] ||= [];
931
922
push @{$topic -> [5]}, $1 ;
932
- $topic = $in_desc = undef ;
933
923
next ;
934
924
}
935
925
936
926
}
937
- wildo_flush_topic ($in_section , \%what , $topic );
927
+ wildo_queue ($in_section , \%what , $topic );
938
928
939
929
my $ipbl = " " ;
940
930
for my $what (sort keys %what ) {
@@ -954,12 +944,12 @@ sub wildo {
954
944
}
955
945
$count = " #$count " ;
956
946
printf " %s %-60s %s%s %5s\n " , $sign , $name , $tip , $next , $count ;
957
- if ($what !~ / ^Will / ) {
947
+ if ($what !~ / ^Will merge to ' \w +' \. $ / ) {
958
948
for my $s (@$source ) {
959
949
if ($s =~ / ^<(.*)>$ / ) {
960
950
$s = " https://lore.kernel.org/git/$1 /" ;
961
951
}
962
- printf " $s \n " ;
952
+ printf " $s \n " ;
963
953
}
964
954
}
965
955
}
0 commit comments