options:
+ --epoch=RANGE range of v2 epochs to clone (e.g `2..5', `~0', `~1..')
+ --objstore [DIR] share storage for coderepos
--torsocks VAL whether or not to wrap git and curl commands with
torsocks (default: `auto')
Must be one of: `auto', `no' or `yes'
+ --dry-run | -n show what would be cloned without cloning
--verbose | -v increase verbosity (may be repeated)
--quiet | -q increase verbosity (may be repeated)
-C DIR chdir to specified directory
EOF
-GetOptions($opt, qw(help|h quiet|q verbose|v+ C=s@ c=s@
- no-torsocks torsocks=s)) or die $help;
+GetOptions($opt, qw(help|h quiet|q verbose|v+ C=s@ c=s@ include|I=s@ exclude=s@
+ inbox-config=s inbox-version=i objstore:s
+ dry-run|n jobs|j=i no-torsocks torsocks=s epoch=s)) or die $help;
if ($opt->{help}) { print $help; exit };
require PublicInbox::Admin; # loads Config
PublicInbox::Admin::do_chdir(delete $opt->{C});
index($dst, "\n") >= 0 and die "`\\n' not allowed in `$dst'";
# n.b. this is still a truckload of code...
-require URI;
require PublicInbox::LEI;
require PublicInbox::LeiExternal;
require PublicInbox::LeiMirror;
-require PublicInbox::LeiCurl;
-require PublicInbox::Lock;
$url = PublicInbox::LeiExternal::ext_canonicalize($url);
my $lei = bless {
src => $url,
dst => $dst,
}, 'PublicInbox::LeiMirror';
+
+$? = 0;
$mrr->do_mirror;
-$mrr->can('do_finish_mirror')->([$mrr, $lei], $$);
+$mrr->can('_wq_done_wait')->([$mrr, $lei], $$);
exit(($lei->{child_error} // 0) >> 8);