* [PATCH 0/2] import_slrnspool updates
@ 2018-05-02 20:58 Eric Wong
2018-05-02 20:58 ` [PATCH 1/2] scripts/import_slrnspool: support v2 repos Eric Wong
2018-05-02 20:58 ` [PATCH 2/2] scripts/import_slrnspool: cleanup progress messages Eric Wong
0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2018-05-02 20:58 UTC (permalink / raw)
To: meta
Yep, working on getting some archives while news.gmane.org still exists...
Eric Wong (2):
scripts/import_slrnspool: support v2 repos
scripts/import_slrnspool: cleanup progress messages
scripts/import_slrnspool | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
--
EW
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] scripts/import_slrnspool: support v2 repos
2018-05-02 20:58 [PATCH 0/2] import_slrnspool updates Eric Wong
@ 2018-05-02 20:58 ` Eric Wong
2018-05-02 20:58 ` [PATCH 2/2] scripts/import_slrnspool: cleanup progress messages Eric Wong
1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2018-05-02 20:58 UTC (permalink / raw)
To: meta
---
scripts/import_slrnspool | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/scripts/import_slrnspool b/scripts/import_slrnspool
index 7b6c9ab..ab79e79 100755
--- a/scripts/import_slrnspool
+++ b/scripts/import_slrnspool
@@ -25,7 +25,15 @@ defined $recipient or die usage();
my $config = PublicInbox::Config->new;
my $ibx = $config->lookup($recipient);
my $git = $ibx->git;
-my $im = PublicInbox::Import->new($git, $ibx->{name}, $ibx->{-primary_address});
+my $im;
+if (($ibx->{version} || 1) == 2) {
+ require PublicInbox::V2Writable;
+ $im = PublicInbox::V2Writable->new($ibx);
+ $im->{parallel} = 0; # pointless to be parallel for a single message
+} else {
+ $im = PublicInbox::Import->new($git, $ibx->{name},
+ $ibx->{-primary_address});
+}
sub key {
"publicinbox.$ibx->{name}.importslrnspoolstate";
--
EW
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] scripts/import_slrnspool: cleanup progress messages
2018-05-02 20:58 [PATCH 0/2] import_slrnspool updates Eric Wong
2018-05-02 20:58 ` [PATCH 1/2] scripts/import_slrnspool: support v2 repos Eric Wong
@ 2018-05-02 20:58 ` Eric Wong
1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2018-05-02 20:58 UTC (permalink / raw)
To: meta
Stop showing redundant slashes and stop showing progress
for messages which do not exist.
---
scripts/import_slrnspool | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/import_slrnspool b/scripts/import_slrnspool
index ab79e79..1a7d77a 100755
--- a/scripts/import_slrnspool
+++ b/scripts/import_slrnspool
@@ -59,12 +59,13 @@ my $n = get_min();
my $ok;
my $max_gap = 200000;
my $max = $n + $max_gap;
+$spool =~ s!/+\z!!;
for (; $exit == 0 && $n < $max; $n++) {
my $fn = "$spool/$n";
- print STDERR $fn, "\n";
open(my $fh, '<', $fn) or next;
$max = $n + $max_gap;
+ print STDERR $fn, "\n";
my $mime = PublicInbox::MIME->new(eval { local $/; <$fh> });
my $hdr = $mime->header_obj;
--
EW
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-02 20:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-02 20:58 [PATCH 0/2] import_slrnspool updates Eric Wong
2018-05-02 20:58 ` [PATCH 1/2] scripts/import_slrnspool: support v2 repos Eric Wong
2018-05-02 20:58 ` [PATCH 2/2] scripts/import_slrnspool: cleanup progress messages Eric Wong
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).