diff options
author | David Golden <dagolden@cpan.org> | 2010-06-29 21:28:24 -0400 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2010-06-29 21:28:24 -0400 |
commit | 0d083db364216f828907c1016507e100d0103f9c (patch) | |
tree | 1cc82c938479c0be8777a5af6cf2f231568107ff /Porting/git-deltatool | |
parent | 813fcdee40ed61472236553cef309e133e8c4775 (diff) | |
download | perl-0d083db364216f828907c1016507e100d0103f9c.tar.gz |
Improve git-deltatool UI and support cherrymaint
Allows going 'back' from a section submenu to the main menu for each
commit.
Adds support for calling Porting/cherrymaint to recommend cherrypicking
while reviewing commits for perldelta.
One must recommend cherrymaint before specifying other actions in either
the assign or review modes. This is hack-ish, but should work well enough
to capture cherrymaint nominations while the release manager is
reviewing commits anyway.
Diffstat (limited to 'Porting/git-deltatool')
-rwxr-xr-x | Porting/git-deltatool | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/Porting/git-deltatool b/Porting/git-deltatool index 8ab7c80d0c..ac35441816 100755 --- a/Porting/git-deltatool +++ b/Porting/git-deltatool @@ -9,6 +9,7 @@ use warnings; package Git::DeltaTool; use Class::Struct; +use File::Basename; use File::Temp; use Getopt::Long; use Git::Wrapper; @@ -343,6 +344,15 @@ sub y_n { # handlers #--------------------------------------------------------------------------# +sub do_cherry { + my ($self, $choice, $log) = @_; + my $id = $log->short_id; + $self->y_n("Recommend a cherry pick of '$id' to maint?") or return; + my $cherrymaint = dirname($0) . "/cherrymaint"; + system("$^X $cherrymaint --vote $id"); + return; # false will re-prompt the same commit +} + sub do_done { my ($self, $choice, $log) = @_; my $note = $log->notes; @@ -444,6 +454,8 @@ sub do_platform { sub do_quit { exit 0 } +sub do_repeat { return 0 } + sub do_skip { return 1 } sub do_special { @@ -471,8 +483,9 @@ HERE sub do_subsection { my ($self, $choice, $log) = @_; + my @choices = ( $choice->{subsection}, $self->submenu_choices ); say "For " . _strip_parens($choice->{name}) . ":"; - return $self->dispatch( $self->prompt( $choice->{subsection} ), $log); + return $self->dispatch( $self->prompt( @choices ), $log); } #--------------------------------------------------------------------------# @@ -482,12 +495,22 @@ sub do_subsection { sub action_choices { my ($self) = @_; state $action_choices = [ + { name => '(+)Cherrymaint', handler => 'cherry' }, { name => 'S(k)ip', handler => 'skip' }, { name => '(Q)uit', handler => 'quit' }, ]; return $action_choices; } +sub submenu_choices { + my ($self) = @_; + state $submenu_choices = [ + { name => '(B)ack', handler => 'repeat' }, + ]; + return $submenu_choices; +} + + sub review_choices { my ($self) = @_; state $action_choices = [ |