From e85404c6d681512ff013200e9936bb706facc8cb Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 23 May 2019 09:36:49 +0000 Subject: xcpdb: implement using Perl bindings By avoid copydatabase(1) entirely, we can make further changes to avoid locking the entire inbox for a long operation and switch to fine-grained locking. --- script/public-inbox-xcpdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'script') diff --git a/script/public-inbox-xcpdb b/script/public-inbox-xcpdb index cbf9f556..d494991d 100755 --- a/script/public-inbox-xcpdb +++ b/script/public-inbox-xcpdb @@ -8,7 +8,7 @@ use PublicInbox::Admin; PublicInbox::Admin::require_or_die('-search'); my $usage = "Usage: public-inbox-xcpdb INBOX_DIR\n"; my @ibxs = PublicInbox::Admin::resolve_inboxes(\@ARGV) or die $usage; -my $cmd = [qw(copydatabase --no-renumber)]; +my $cmd = [ \&PublicInbox::Xapcmd::cpdb ]; open my $null, '>', '/dev/null' or die "failed to open /dev/null: $!\n"; my $rdr = { 1 => fileno($null) }; foreach (@ibxs) { -- cgit v1.2.3-24-ge0c7