Skip Menu |

This queue is for tickets about the Dist-Zilla-Plugin-Mercurial CPAN distribution.

Report information
The Basics
Id: 105191
Status: rejected
Priority: 0/
Queue: Dist-Zilla-Plugin-Mercurial

People
Owner: Nobody in particular
Requestors: VDB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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");
Yes, it is a bug of Dist::Zilla, see https://github.com/rjbs/Dist-Zilla/issues/397 However, it is not fixed for ~6 months, so it is probably worth to implement a workaround I proposed.
Hi VDB, On Fri Jun 12 12:38:06 2015, VDB wrote: Show quoted text
> Yes, it is a bug of Dist::Zilla, see > > https://github.com/rjbs/Dist-Zilla/issues/397 > > However, it is not fixed for ~6 months, so it is probably worth to > implement a workaround I proposed.
If it's a bug of Dist-Zilla or one of its dependencies, then it should be fixed there. Otherwise, implementing workarounds will complicate the code and will make the problem still present for other systems. I once said that ( http://www.shlomifish.org/humour.html#real_programmers_dont_write ) “Real programmers don’t write workarounds. They tell their users to upgrade their software. ” and while it isn't true, it seems relevant here. Can I mark this bug as "rejected"?
On Sun Jun 14 06:16:03 2015, SHLOMIF wrote: Show quoted text
> Can I mark this bug as "rejected"?
Sure.
On Mon Jun 15 13:43:56 2015, VDB wrote: Show quoted text
> On Sun Jun 14 06:16:03 2015, SHLOMIF wrote:
> > Can I mark this bug as "rejected"?
> > Sure. > >
Done then. Thanks! Regards, -- Shlomi Fish