diff options
author | Eric Wong <e@80x24.org> | 2021-03-20 19:04:04 +0900 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-03-21 09:45:47 +0000 |
commit | b6829bbfd86f5d22a8ffb80fd7bfe59299fe6b55 (patch) | |
tree | 97a6e0a9bb519c24fdbef52776312861990af9b5 /lib/PublicInbox/LeiOverview.pm | |
parent | 7d2e572aca7297ea2015d2b6e7c71b672521ec82 (diff) | |
download | public-inbox-b6829bbfd86f5d22a8ffb80fd7bfe59299fe6b55.tar.gz |
"lei q" now preserves changes per-message keywords across invocations when it's --output (Maildir or mbox) is reused (with or without --augment). In the future, these changes will be monitored via inotify, EVFILT_VNODE or IMAP IDLE, too. Unfortunately, this currently prevents "lei import" from ever importing a message that's in an external. That will be fixed in a future change.
Diffstat (limited to 'lib/PublicInbox/LeiOverview.pm')
-rw-r--r-- | lib/PublicInbox/LeiOverview.pm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/PublicInbox/LeiOverview.pm b/lib/PublicInbox/LeiOverview.pm index 1036f465..48237f8a 100644 --- a/lib/PublicInbox/LeiOverview.pm +++ b/lib/PublicInbox/LeiOverview.pm @@ -216,9 +216,11 @@ sub ovv_each_smsg_cb { # runs in wq worker usually } } elsif ($self->{fmt} =~ /\A(concat)?json\z/ && $lei->{opt}->{pretty}) { my $EOR = ($1//'') eq 'concat' ? "\n}" : "\n},"; + my $lse = $lei->{sto}->search; sub { # DIY prettiness :P my ($smsg, $mitem) = @_; return if $dedupe->is_smsg_dup($smsg); + $lse->xsmsg_vmd($smsg); $smsg = _unbless_smsg($smsg, $mitem); $buf .= "{\n"; $buf .= join(",\n", map { @@ -238,9 +240,11 @@ sub ovv_each_smsg_cb { # runs in wq worker usually } } elsif ($json) { my $ORS = $self->{fmt} eq 'json' ? ",\n" : "\n"; # JSONL + my $lse = $lei->{sto}->search; sub { my ($smsg, $mitem) = @_; return if $dedupe->is_smsg_dup($smsg); + $lse->xsmsg_vmd($smsg); $buf .= $json->encode(_unbless_smsg(@_)) . $ORS; return if length($buf) < 65536; my $lk = $self->lock_for_scope; |