Subject: | Mercurial::Push output is not prefixed with plugin name |
Currently Mercurial::Push output looks like:
Show quoted text
> [@Mercurial/Check] This branch (default) is in a clean state
> [ConfirmRelease] *** Preparing to release Dist-Zilla-Plugin-Manifest-Write-0.007.tar.gz with FakeRelease ***
> Do you want to continue the release process? [y/N]: y
> [FakeRelease] Fake release happening (nothing was really done)
> [@Mercurial/Tag] Tagged 0.007
> pushing to /home/vdb/repo/perl-Dist-Zilla-Plugin-Manifest-Write
> searching for changes
> adding changesets
> adding manifests
> adding file changes
> added 23 changesets with 66 changes to 28 files
Note that messages from other plugins are prefixed with plugin name in brackets: [ConfirmRelease], [FakeRelease], [@Mercurial/Check], [@Mercurial/Tag]. But messages from Mercurial::Push are not prefixed. It would be nice to follow common rules.
See attached patch.
Subject: | Push.pm.patch |
--- Push.pm.ORIG 2015-06-14 13:01:43.000000000 +0300
+++ Push.pm 2015-07-04 19:06:02.110952505 +0300
@@ -5,13 +5,15 @@
use autodie qw( :all );
use Moose;
+use IPC::System::Simple (qw( capture ));
with 'Dist::Zilla::Role::AfterRelease';
sub after_release {
my $self = shift;
- system( 'hg push' );
+ my $output = capture( 'hg', 'push' );
+ $self->log( $output );
}
no Moose;