my ($anchor, $breakwater);
my $clogonly;
my $cl;
- $fatal //= sub { fail $_[2]; };
+ $fatal //= sub { fail $_[1]; };
my $x = sub {
my ($cb, $tagsfx, $mainwhy, $xwhy) = @_;
my $why = $mainwhy.$xwhy;
if ($nogenerate) {
return (undef,undef);
}
- die "commit $cur: Cannot cope with this commit (d.".
+ fail "found unprocessable commit, cannot cope:".
+ (defined $cl->{Why} ? "; $cl->{Why}": '').
+ " (commit $cur) (d.".
(join ' ', map { sprintf "%#x", $_->{Differs} }
@{ $cl->{Parents} }).
- (defined $cl->{Why} ? "; $cl->{Why}": '').
")";
};
}
sub cmd_analyse () {
- die if ($ARGV[0]//'') =~ m/^-/;
+ badusage "analyse does not support any options"
+ if @ARGV and $ARGV[0] =~ m/^-/;
badusage "too many arguments to analyse" if @ARGV>1;
my ($old) = @ARGV;
if (defined $old) {
# parse args - low commitment
my $spec_version = shift @ARGV;
my $new_version = (new Dpkg::Version $spec_version, check => 1);
+ fail "bad version number \`$spec_version'" unless defined $new_version;
if ($new_version->is_native()) {
$new_version = (new Dpkg::Version "$spec_version-1", check => 1);
}
print STDERR "cannot stitch in dgit view: $@\n";
}
- snags_maybe_bail();
+ snags_maybe_bail_early();
my $work;
}
};
+ ffq_check $work;
+ snags_maybe_bail();
update_head_checkout $old_head, $work, 'convert-from-gbp';
}