File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -547,20 +547,31 @@ sub topic_in_pu {
547547 return 0;
548548}
549549
550+ my $mergetomaster ;
551+
550552sub tweak_willdo {
551553 my ($td ) = @_ ;
552554 my $desc = $td -> {' desc' };
553555 my $text = $td -> {' text' };
554556
557+ if (!defined $mergetomaster ) {
558+ my $master = ` git describe master` ;
559+ if ($master =~ / -rc\d +(-\d +-g[0-9a-f]+)?$ / ) {
560+ $mergetomaster = " Will cook in 'next'." ;
561+ } else {
562+ $mergetomaster = " Will merge to 'master'." ;
563+ }
564+ }
565+
555566 # If updated description (i.e. the list of patches with
556567 # merge trail to 'next') has 'merged to next', then
557568 # tweak the topic to be slated to 'master'.
558569 # NEEDSWORK: does this work correctly for a half-merged topic?
559570 $desc =~ s /\n <<\n .*// s ;
560571 if ($desc =~ / ^ \( merged to 'next'/m ) {
561- $text =~ s / ^ Will merge to 'next'\. $/ Will merge to 'master'. / m ;
572+ $text =~ s / ^ Will merge to 'next'\. $/ $mergetomaster / m ;
562573 $text =~ s / ^ Will merge to and then cook in 'next'\. $/ Will cook in 'next'./ m ;
563- $text =~ s / ^ Will merge to 'next' and then to 'master'\. $/ Will merge to 'master'. / m ;
574+ $text =~ s / ^ Will merge to 'next' and then to 'master'\. $/ $mergetomaster / m ;
564575 }
565576 $td -> {' text' } = $text ;
566577}
You can’t perform that action at this time.
0 commit comments