From ab9d0491bd43ae8e4e62c4e435688b23d5d7defb Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Tue, 10 Jul 2012 22:33:19 +0200 Subject: [PATCH] Add the `--event` option to `log`. --- lib/App/Sqitch/Command/log.pm | 7 +++++++ lib/sqitch-log.pod | 14 ++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/lib/App/Sqitch/Command/log.pm b/lib/App/Sqitch/Command/log.pm index dcc020ab3..34bb25975 100644 --- a/lib/App/Sqitch/Command/log.pm +++ b/lib/App/Sqitch/Command/log.pm @@ -61,6 +61,11 @@ EOF $FORMATS{oneline} = '%h %l %c'; +has event => ( + is => 'ro', + isa => 'ArrayRef', +); + has change_pattern => ( is => 'ro', isa => 'Str', @@ -196,6 +201,7 @@ has formatter => ( sub options { return qw( + event=s@ change-pattern|change|c=s actor-pattern|actor|a=s max-count|n=i @@ -278,6 +284,7 @@ sub execute { # Search the event log. $iter = $engine->search_events( + event => $self->event, change => $self->change_pattern, actor => $self->actor_pattern, limit => $self->max_count, diff --git a/lib/sqitch-log.pod b/lib/sqitch-log.pod index ddab2cdb5..787e8ae07 100644 --- a/lib/sqitch-log.pod +++ b/lib/sqitch-log.pod @@ -18,6 +18,20 @@ expressions, and limit the results. =over +=item C<--event> + +Filter by event type. May be specified more than once. Allowed values are: + +=over + +=item * C + +=item * C + +=item * C + +=back + =item C<--change-pattern> =item C<--change>