From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id ADCAD1F670 for ; Sat, 7 Nov 2020 10:57:01 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 01/10] extsearch: rename -eindex to -extindex Date: Sat, 7 Nov 2020 10:56:51 +0000 Message-Id: <20201107105700.12586-2-e@80x24.org> In-Reply-To: <20201107105700.12586-1-e@80x24.org> References: <20201107105700.12586-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Upon "eindex" rhymes with "reindex", which could be confusing; so name the command and config prefix to use "extindex" which is hopefully less confusing. --- MANIFEST | 2 +- lib/PublicInbox/Config.pm | 2 +- script/{public-inbox-eindex => public-inbox-extindex} | 4 ++-- t/extsearch.t | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) rename script/{public-inbox-eindex => public-inbox-extindex} (93%) diff --git a/MANIFEST b/MANIFEST index 10561cd2..fc79a134 100644 --- a/MANIFEST +++ b/MANIFEST @@ -225,7 +225,7 @@ sa_config/user/.spamassassin/user_prefs script/public-inbox-compact script/public-inbox-convert script/public-inbox-edit -script/public-inbox-eindex +script/public-inbox-extindex script/public-inbox-httpd script/public-inbox-imapd script/public-inbox-index diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index d425cc9b..d2010f7a 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -91,7 +91,7 @@ sub lookup_name ($$) { sub lookup_ei { my ($self, $name) = @_; - $self->{-ei_by_name}->{$name} //= _fill_ei($self, "eindex.$name"); + $self->{-ei_by_name}->{$name} //= _fill_ei($self, "extindex.$name"); } sub each_inbox { diff --git a/script/public-inbox-eindex b/script/public-inbox-extindex similarity index 93% rename from script/public-inbox-eindex rename to script/public-inbox-extindex index c26edb93..a58f35ca 100644 --- a/script/public-inbox-eindex +++ b/script/public-inbox-extindex @@ -6,7 +6,7 @@ use strict; use v5.10.1; use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_abbrev); my $help = < -1, compact => 0, max_size => undef, fsync => 1 }; GetOptions($opt, qw(verbose|v+ reindex rethread compact|c+ jobs|j=i diff --git a/t/extsearch.t b/t/extsearch.t index 8d2c1507..8792fd9e 100644 --- a/t/extsearch.t +++ b/t/extsearch.t @@ -33,7 +33,7 @@ seek($fh, 0, SEEK_SET) or BAIL_OUT $!; run_script(['-mda', '--no-precheck'], $env, { 0 => $fh }) or BAIL_OUT '-mda'; run_script(['-index', "$home/v1test"]) or BAIL_OUT "index $?"; -ok(run_script([qw(-eindex --all), "$home/eindex"]), 'eindex init'); +ok(run_script([qw(-extindex --all), "$home/eindex"]), 'extindex init'); my $es = PublicInbox::ExtSearch->new("$home/eindex"); { @@ -53,8 +53,8 @@ my $es = PublicInbox::ExtSearch->new("$home/eindex"); my $env = { MAIL_EDITOR => "$^X -i -p -e 's/test message/BEST MSG/'" }; my $cmd = [ qw(-edit -Ft/utf8.eml), "$home/v2test" ]; ok(run_script($cmd, $env, $opt), '-edit'); - ok(run_script([qw(-eindex --all), "$home/eindex"], undef, $opt), - 'eindex again'); + ok(run_script([qw(-extindex --all), "$home/eindex"], undef, $opt), + 'extindex again'); like($err, qr/discontiguous range/, 'warned about discontiguous range'); my $msg1 = $es->over->get_art(1) or BAIL_OUT 'msg1 missing'; my $msg2 = $es->over->get_art(2) or BAIL_OUT 'msg2 missing';