diff --git a/Changes b/Changes index fbc954bc..bfc80831 100644 --- a/Changes +++ b/Changes @@ -14,6 +14,9 @@ Revision history for Perl extension App::Sqitch - Fixed the output of the list of changes to be deployed or reverted to actually require `--verbose` twice, as described in the v1.4.0 changes, and not just once. Thanks to Erik Wienhold for the PR (#785)! + - Removed the duplicate change name from the output of the list of + changes to be deployed or reverted with `-VV`. Thanks to Erik Wienhold + for the PR (#787)! 1.4.0 2023-08-01T23:37:30Z - Fixed Snowflake warehouse and role setup to properly quote identifiers diff --git a/lib/App/Sqitch/Engine.pm b/lib/App/Sqitch/Engine.pm index af6c901a..0c04a316 100644 --- a/lib/App/Sqitch/Engine.pm +++ b/lib/App/Sqitch/Engine.pm @@ -270,7 +270,7 @@ sub deploy { ); $sqitch->debug(__ "Will deploy the following changes:"); - foreach my $will_deploy_position ($plan->position .. $to_index) { + foreach my $will_deploy_position (($plan->position + 1) .. $to_index) { $sqitch->debug($plan->change_at($will_deploy_position)->format_name_with_tags); } diff --git a/t/engine.t b/t/engine.t index 95ebfc82..a495dc9b 100755 --- a/t/engine.t +++ b/t/engine.t @@ -4,7 +4,7 @@ use strict; use warnings; use 5.010; use utf8; -use Test::More tests => 780; +use Test::More tests => 781; # use Test::More 'no_plan'; use App::Sqitch; use App::Sqitch::Plan; @@ -1169,6 +1169,7 @@ is_deeply +MockOutput->get_info, [ ], 'Should have emitted deploy announcement and successes'; # Make sure we can deploy everything by change. +MockOutput->clear; $latest_change_id = undef; $plan->reset; $plan->add( name => 'lolz', note => 'ha ha' ); @@ -1208,6 +1209,15 @@ is_deeply +MockOutput->get_info_literal, [ [' + lolz ..', '.........', ' '], ], 'Should have seen the output of the deploy to the end'; +is_deeply +MockOutput->get_debug, [ + [__ 'Will deploy the following changes:' ], + ['roles'], + ['users @alpha'], + ['widgets @beta'], + ['lolz'], +], 'Debug output should show what will be deployed'; + + # If we deploy again, it should be up-to-date. $latest_change_id = $changes[-1]->id; ok $engine->deploy, 'Should return success for deploy to up-to-date DB';