user/dev discussion of public-inbox itself
 help / color / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
						download: 
* [PATCH] convert: preserve indexlevel on conversions
@ 2020-02-08 18:08  7% Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2020-02-08 18:08 UTC (permalink / raw)
  To: meta

We don't want to blow up users storage too badly when converting
v1 to v2 or break because they don't have Xapian bindings installed.
---
 script/public-inbox-convert | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/script/public-inbox-convert b/script/public-inbox-convert
index 906001cb..e13c13f4 100755
--- a/script/public-inbox-convert
+++ b/script/public-inbox-convert
@@ -6,6 +6,7 @@ use warnings;
 use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_abbrev);
 use PublicInbox::InboxWritable;
 use PublicInbox::Config;
+use PublicInbox::Admin;
 use PublicInbox::V2Writable;
 use PublicInbox::Git;
 use PublicInbox::Spawn qw(spawn);
@@ -45,6 +46,14 @@ $old = PublicInbox::InboxWritable->new($old);
 if ($old->version >= 2) {
 	die "Only conversion from v1 inboxes is supported\n";
 }
+
+$old->{indexlevel} //= PublicInbox::Admin::detect_indexlevel($old);
+if ($index) {
+	my $mods = {};
+	PublicInbox::Admin::scan_ibx_modules($mods, $old);
+	PublicInbox::Admin::require_or_die(keys %$mods);
+}
+
 my $new = { %$old };
 $new->{inboxdir} = abs_path($new_dir);
 $new->{version} = 2;

^ permalink raw reply	[relevance 7%]

Results 1-1 of 1 | reverse results
2020-02-08 18:08  7% [PATCH] convert: preserve indexlevel on conversions Eric Wong


user/dev discussion of public-inbox itself

Archives are clonable:
	git clone --mirror https://public-inbox.org/meta
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.mail.public-inbox.meta
	nntp://ou63pmih66umazou.onion/inbox.comp.mail.public-inbox.meta
	nntp://czquwvybam4bgbro.onion/inbox.comp.mail.public-inbox.meta
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.mail.public-inbox.meta
	nntp://news.gmane.io/gmane.mail.public-inbox.general

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git