Meta/cook: hold topics in 'next' by default during -rc period
Junio C Hamano committed
Oct 18, 2017 at 11:57 UTC
2c210db464ce97f0c635a516fa8a0d5fd43f3a73
1 file changed
+13
-2
cook
+13
-2
index 7370f95bb3..5e2b2c97d5 100755
--- a/cook
+++ b/cook
@@ -547,20 +547,31 @@ sub topic_in_pu {
return 0;
}
+my $mergetomaster;
+
sub tweak_willdo {
my ($td) = @_;
my $desc = $td->{'desc'};
my $text = $td->{'text'};
+ if (!defined $mergetomaster) {
+ my $master = `git describe master`;
+ if ($master =~ /-rc\d+(-\d+-g[0-9a-f]+)?$/) {
+ $mergetomaster = "Will cook in 'next'.";
+ } else {
+ $mergetomaster = "Will merge to 'master'.";
+ }
+ }
+
# If updated description (i.e. the list of patches with
# merge trail to 'next') has 'merged to next', then
# tweak the topic to be slated to 'master'.
# NEEDSWORK: does this work correctly for a half-merged topic?
$desc =~ s/\n<<\n.*//s;
if ($desc =~ /^ \(merged to 'next'/m) {
- $text =~ s/^ Will merge to 'next'\.$/ Will merge to 'master'./m;
+ $text =~ s/^ Will merge to 'next'\.$/ $mergetomaster/m;
$text =~ s/^ Will merge to and then cook in 'next'\.$/ Will cook in 'next'./m;
- $text =~ s/^ Will merge to 'next' and then to 'master'\.$/ Will merge to 'master'./m;
+ $text =~ s/^ Will merge to 'next' and then to 'master'\.$/ $mergetomaster/m;
}
$td->{'text'} = $text;
}