From 2c472f1f571ae55155c78bcbc4d420d06266ba63 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 15 Nov 2023 09:21:43 +0000 Subject: lei convert: fix repeat and idempotent v2 output We should be able to treat v2 outputs just like any other mail format, with the exception that content dedupe is always enforced by the v2 format. This allows users hosting v2 public-inboxes to catch up broken synchronization from alternate archives such as the mbox archives hosted by https://lists.gnu.org/ Link: https://public-inbox.org/meta/20231114-hypersonic-papaya-starling-e1cfc8@nitro/ --- lib/PublicInbox/V2Writable.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox/V2Writable.pm') diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 4d606dfe..231ed516 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -135,7 +135,7 @@ sub add { if (do_idx($self, $mime, $smsg)) { $self->checkpoint; } - + ++$self->{-nr_add}; # for lei convert $cmt; } @@ -611,6 +611,7 @@ sub done { $self->lock_release(!!$nbytes) if $shards; $self->git->cleanup; die $err if $err; + delete $self->{-nr_add}; # for lei-convert } sub importer { -- cgit v1.2.3-24-ge0c7