This matches Import::done behavior
sub done {
my ($self) = @_;
sub done {
my ($self) = @_;
+ my $locked = defined $self->{idx_parts};
my $im = delete $self->{im};
$im->done if $im; # PublicInbox::Import::done
$self->searchidx_checkpoint(0);
my $im = delete $self->{im};
$im->done if $im; # PublicInbox::Import::done
$self->searchidx_checkpoint(0);
+ $self->lock_release if $locked;
$im->done;
is($git0->qx(qw(log -1 --pretty=raw --raw -r --no-abbrev)),
$after, 'no git history made with idempotent remove');
$im->done;
is($git0->qx(qw(log -1 --pretty=raw --raw -r --no-abbrev)),
$after, 'no git history made with idempotent remove');
+ eval { $im->done };
+ ok(!$@, '->done is idempotent');