Subject: | Mercurial::Check lists not-yet-checked-in files twice |
If some files are not yet checked in, dzil prints the list of not-yet-checked-in files twice. It probably a bug in dzil itself — everything passed to log_error is printed twice.
Meanwhile, there are a simple workaround for the problem: Mercurial::Check should use log (not log_fatal) to report the list, and then log_fatal with a short message to abort dzil.
Patch:
--- lib/Dist/Zilla/Plugin/Mercurial/Check.pm.ORIG 2015-06-12 13:20:12.000000000 +0300
+++ lib/Dist/Zilla/Plugin/Mercurial/Check.pm 2015-06-12 16:51:58.383868488 +0300
@@ -17,7 +17,9 @@
my $errmsg
= "This branch ($branch) has some files that are not yet committed:\n"
. join q{}, map {"\t$_"} @output;
- $self->log_fatal($errmsg);
+ chomp $errmsg; # Drop the last newline — it causes empty line in dzil output.
+ $self->log($errmsg);
+ $self->log_fatal('Aborting release');
}
$self->log("This branch ($branch) is in a clean state");