Date: Sun, 29 Jul 2018 15:52:57 -0500
Signed-off-by: "Eric W. Biederman" <[email protected]>
---
Hmm. I thought I was using this but now that I am quickly checking
I don't see this being used anywhere. I think
PublicInbox::Admin::resolve_inboxes has superceded this functionality.
Please feel free to drop this one. I am just sending it at this
point because it would be strange to get to 3/4 and not send
the patch.
lib/PublicInbox/Config.pm | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm
index 9ec00b0ddb6d..7c5221c395be 100644
--- a/lib/PublicInbox/Config.pm
+++ b/lib/PublicInbox/Config.pm
@@ -156,6 +156,23 @@ sub lookup_newsgroup {
undef;
}
+sub lookup_repodir {
+ my ($self, $repodir) = @_;
+ my $rv = $self->{-by_repodir}->{$repodir};
+ return $rv if $rv;
+
+ foreach my $k (keys %$self) {
+ $k =~ /\A(publicinbox\.[\w-]+)\.mainrepo\z/ or next;
+ my $v = $self->{$k};
+ my $pfx = $1;
+ if ($v eq $repodir) {
+ $rv = _fill($self, $pfx);
+ return $rv;
+ }
+ }
+ undef;
+}
+
sub limiter {
my ($self, $name) = @_;
$self->{-limiters}->{$name} ||= do {
--
2.23.0
--
unsubscribe: [email protected]
archive: https://public-inbox.org/meta/