candidates: some topics have capital letters in their names
Junio C Hamano committed
Dec 8, 2010 at 15:35 UTC
83f8c7461e84aeacc496dac2e994d8c25f91d1e8
1 file changed
+10
-6
candidates
+10
-6
@@ -15,29 +15,33 @@ sub merged {
15
return $count;
16
}
17
18
-my ($topic, $topic_date);
18
+my ($topic, $topic_date, $last);
19
my (@candidate);
20
21
while (<>) {
22
- if (/^\* ([a-z][a-z]\/[-a-z0-9_]+) \(([-0-9]{10})\) \d+ commit/) {
23
- $topic = $1;
22
+ if (/^\* ([a-z][a-z]\/[-a-zA-Z0-9_]+) \(([-0-9]{10})\) \d+ commit/) {
23
+ $topic = $last = $1;
24
$topic_date = $2;
25
next;
26
}
27
if (defined $topic) {
28
if (/^ \(merged to 'next' on ([-0-9]{10}) at/) {
29
- push @candidate, [$topic, $1, $topic_date];
29
+ push @candidate, [$topic, $1, $topic_date, ""];
30
next;
31
}
32
$topic = undef;
33
$topic_date = undef;
34
}
35
+ if (defined $last && @candidate && $candidate[-1][0] eq $last) {
36
+ if (/Will merge to 'master'/i) {
37
+ $candidate[-1][3] = "*";
38
+ }
39
+ }
40
}
41
42
for $topic (sort { ($a->[1] cmp $b->[1]) || ($a->[2] cmp $b->[2]) } @candidate) {
43
my $count = merged($topic->[0], 'master');
44
if ($count) {
40
- print "$topic->[1] $topic->[2] ($count) $topic->[0]\n";
45
+ print "$topic->[1] $topic->[2] ($count) $topic->[3]$topic->[0]\n";
46
}
47
}
43
-