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;
}