The (currently undocumented) "--no-index" flag did not trigger
the V2Writable->done call necessary to make the import
successful.
Fixes: eea47b676127bcdb ("convert: preserve highwater mark from v1 msgmap")
chop(my $cmt = $epoch0->qx(qw(rev-parse --verify), $head));
$v2w->last_epoch_commit(0, $cmt);
}
chop(my $cmt = $epoch0->qx(qw(rev-parse --verify), $head));
$v2w->last_epoch_commit(0, $cmt);
}
-if ($index) {
- $v2w->index_sync({reindex => 1});
- $v2w->done;
-}
+$v2w->index_sync({reindex => 1}) if $index;
+$v2w->done;
};
ok(defined($hwm) && $hwm > 0, "highwater mark set #$hwm");
};
ok(defined($hwm) && $hwm > 0, "highwater mark set #$hwm");
+$cmd = [ '-convert', '--no-index', $ibx->{inboxdir}, "$tmpdir/no-index" ];
+ok(run_script($cmd, undef, $rdr), 'convert --no-index works');
+
$cmd = [ '-convert', $ibx->{inboxdir}, "$tmpdir/v2" ];
ok(run_script($cmd, undef, $rdr), 'convert works');
@xdir = glob("$tmpdir/v2/xap*/*");
$cmd = [ '-convert', $ibx->{inboxdir}, "$tmpdir/v2" ];
ok(run_script($cmd, undef, $rdr), 'convert works');
@xdir = glob("$tmpdir/v2/xap*/*");