]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Meta/cook: do not mark 'discarded' ones as graduate
authorJunio C Hamano <gitster@pobox.com>
Thu, 29 Sep 2011 01:11:04 +0000 (18:11 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 29 Sep 2011 01:11:04 +0000 (18:11 -0700)
cook

diff --git a/cook b/cook
index 81e45d700b26a0db06d336640fb97173d5a94b13..f3afbd39b461da29a93b49d6334c233c648120e7 100755 (executable)
--- a/cook
+++ b/cook
@@ -10,7 +10,8 @@ my %reverts = ('next' => {
 %reverts = ();
 
 sub phrase_these {
-       my (@u) = sort @_;
+       my %uniq = ();
+       my (@u) = grep { $uniq{$_}++ == 0 } sort @_;
        my @d = ();
        for (my $i = 0; $i < @u; $i++) {
                push @d, $u[$i];
@@ -437,6 +438,7 @@ sub write_cooking {
 
 my $graduated = 'Graduated to "master"';
 my $new_topics = 'New Topics';
+my $discarded = 'Discarded';
 my $old_new_topics = 'Old New Topics';
 
 sub update_issue {
@@ -547,6 +549,7 @@ sub merge_cooking {
                        }
                        next;
                }
+               # Annotate if the contents of the topic changed
                my $n = $current->{$topic}{'desc'};
                my $o = $td->{$topic}{'desc'};
                if ($n ne $o) {
@@ -558,6 +561,7 @@ sub merge_cooking {
                next if ($topic eq $blurb);
                next if (!$incremental &&
                         grep { $topic eq $_ } @{$sd->{$graduated}});
+               next if (grep { $topic eq $_ } @{$sd->{$discarded}});
                if (!exists $current->{$topic}) {
                        push @gone_topic, $topic;
                }
@@ -627,10 +631,19 @@ sub wildo {
                }
                next if (/^ /);
                if (defined $topic &&
-                   /Will (?:\S+ )?(merge|drop|discard|cook)[. ]/i) {
+                   /Will (?:\S+ ){0,2}(merge|drop|discard|cook)[. ]/i) {
                        wildo_queue(\%what, $_, $topic);
                        $topic = undef;
                }
+               if (defined $topic &&
+                   /^Not urgent;/) {
+                       wildo_queue(\%what, $_, $topic);
+                       $topic = undef;
+               }
+               if (defined $topic &&
+                   /Originally merged to 'next' on ([-0-9]+)/) {
+                       $topic->[1] = $1;
+               }
        }
        if (defined $topic) {
                wildo_queue(\%what, "Undecided", $topic);