* [PATCH 3/6] lei_input: reject --mail-sync if using HTTP(S) for now
2021-05-02 6:05 5% [PATCH 0/6] lei: more steps towards kw sync Eric Wong
@ 2021-05-02 6:05 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-05-02 6:05 UTC (permalink / raw)
To: meta
I'm not sure how we'll distinguish JMAP vs read-only HTTPS,
yet; but we'll focus on currently-supported stuff, first.
---
lib/PublicInbox/LeiInput.pm | 2 ++
t/lei-import-http.t | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/lib/PublicInbox/LeiInput.pm b/lib/PublicInbox/LeiInput.pm
index 917f682b..85caac35 100644
--- a/lib/PublicInbox/LeiInput.pm
+++ b/lib/PublicInbox/LeiInput.pm
@@ -229,6 +229,8 @@ sub prepare_inputs { # returns undef on error
}
}
} elsif ($input_path =~ m!\Ahttps?://!i) {
+ # TODO: how would we detect r/w JMAP?
+ push @{$sync->{no}}, $input if $sync;
prepare_http_input($self, $lei, $input_path) or return;
} elsif ($input_path =~ s/\A([a-z0-9]+)://is) {
my $ifmt = lc $1;
diff --git a/t/lei-import-http.t b/t/lei-import-http.t
index 35cbf369..6cb8a753 100644
--- a/t/lei-import-http.t
+++ b/t/lei-import-http.t
@@ -39,5 +39,10 @@ test_lei({ tmpdir => $tmpdir }, sub {
$res = json_utf8->decode($lei_out);
is($res->[0]->{'m'}, '20180720072141.GA15957@example',
'imported search result') or diag explain($res);
+
+ ok(!lei(qw(import --mail-sync), "$url/x\@example.com/raw"),
+ '--mail-sync fails on HTTP');
+ diag $lei_err;
+
});
done_testing;
^ permalink raw reply related [relevance 7%]
* [PATCH 0/6] lei: more steps towards kw sync
@ 2021-05-02 6:05 5% Eric Wong
2021-05-02 6:05 7% ` [PATCH 3/6] lei_input: reject --mail-sync if using HTTP(S) for now Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-05-02 6:05 UTC (permalink / raw)
To: meta
6/6 is a fairly significant change, but I think it's
worth doing by default to make things less surprising
for eventual users of "lei export-kw" (I'm not sure if
that's even a good name).
Eric Wong (6):
lei <q|up>: combine written/results into one line
lei_input: common net_merge_all_done for lei <import|tag>
lei_input: reject --mail-sync if using HTTP(S) for now
lei: simplify workers_start API
net_writer: use "FLAGS.SILENT" to set keywords
lei <q|up>: writes to Maildirs and IMAP use mail-sync
lib/PublicInbox/LEI.pm | 5 +++--
lib/PublicInbox/LeiBlob.pm | 2 +-
lib/PublicInbox/LeiConvert.pm | 2 +-
lib/PublicInbox/LeiImport.pm | 9 ++-------
lib/PublicInbox/LeiInput.pm | 9 +++++++++
lib/PublicInbox/LeiLsSearch.pm | 2 +-
lib/PublicInbox/LeiMirror.pm | 2 +-
lib/PublicInbox/LeiP2q.pm | 2 +-
lib/PublicInbox/LeiQuery.pm | 7 +++----
lib/PublicInbox/LeiStore.pm | 8 ++++----
lib/PublicInbox/LeiTag.pm | 9 ++-------
lib/PublicInbox/LeiToMail.pm | 24 +++++++++++++++++-------
lib/PublicInbox/LeiXSearch.pm | 9 +++++----
lib/PublicInbox/NetWriter.pm | 14 ++++++--------
t/lei-import-http.t | 5 +++++
xt/net_writer-imap.t | 9 +++++++--
16 files changed, 68 insertions(+), 50 deletions(-)
^ permalink raw reply [relevance 5%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-05-02 6:05 5% [PATCH 0/6] lei: more steps towards kw sync Eric Wong
2021-05-02 6:05 7% ` [PATCH 3/6] lei_input: reject --mail-sync if using HTTP(S) for now Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).