This will allow ExtSearchIdx to override or reuse them more
easily. Unfortunately we lose prototype validation, but that
seems to be discouraged anyways given the 'signatures' feature
in Perl 5.20+.
}
# only update last_commit for $i on reindex iff newer than current
}
# only update last_commit for $i on reindex iff newer than current
+# $sync will be used by subclasses
- my ($self, $git, $i, $cmt) = @_;
+ my ($self, $sync, $git, $i, $cmt) = @_;
my $last = last_epoch_commit($self, $i);
if (defined $last && is_ancestor($git, $last, $cmt)) {
my @cmd = (qw(rev-list --count), "$last..$cmt");
my $last = last_epoch_commit($self, $i);
if (defined $last && is_ancestor($git, $last, $cmt)) {
my @cmd = (qw(rev-list --count), "$last..$cmt");
last_epoch_commit($self, $i, $cmt);
}
last_epoch_commit($self, $i, $cmt);
}
my ($self, $sync) = @_;
my $heads = [];
for (my $i = $sync->{epoch_max}; $i >= 0; $i--) {
my ($self, $sync) = @_;
my $heads = [];
for (my $i = $sync->{epoch_max}; $i >= 0; $i--) {
sub sync_prepare ($$) {
my ($self, $sync) = @_;
sub sync_prepare ($$) {
my ($self, $sync) = @_;
+ $sync->{ranges} = sync_ranges($self, $sync);
my $pr = $sync->{-opt}->{-progress};
my $regen_max = 0;
my $head = $sync->{ibx}->{ref_head} || 'HEAD';
my $pr = $sync->{-opt}->{-progress};
my $regen_max = 0;
my $head = $sync->{ibx}->{ref_head} || 'HEAD';
}
}
$all->async_wait_all;
}
}
$all->async_wait_all;
- $self->update_last_commit($git, $i, $stk->{latest_cmt});
+ $self->update_last_commit($sync, $git, $i, $stk->{latest_cmt});
ibx => $self->{ibx},
epoch_max => $epoch_max,
};
ibx => $self->{ibx},
epoch_max => $epoch_max,
};
- $sync->{ranges} = sync_ranges($self, $sync);
if (sync_prepare($self, $sync)) {
# tmp_clone seems to fail if inside a transaction, so
# we rollback here (because we opened {mm} for reading)
if (sync_prepare($self, $sync)) {
# tmp_clone seems to fail if inside a transaction, so
# we rollback here (because we opened {mm} for reading)