X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FWwwStream.pm;h=082e5ec9caf3b3466efe96ae0439d81a05a4a4db;hb=d304870c3c1e82f0421272e7986fc5c9aafa2889;hp=c708c21f21741b43f04b51caab59e6d63f6cd966;hpb=7a3946ef122e8218c6ce3355d7f968562212d53b;p=public-inbox.git diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm index c708c21f..082e5ec9 100644 --- a/lib/PublicInbox/WwwStream.pm +++ b/lib/PublicInbox/WwwStream.pm @@ -10,9 +10,7 @@ package PublicInbox::WwwStream; use strict; use warnings; use PublicInbox::Hval qw(ascii_html); -use URI; our $TOR_URL = 'https://www.torproject.org/'; -our $TOR2WEB_URL = 'https://www.tor2web.org/'; our $CODE_URL = 'https://public-inbox.org/'; our $PROJECT = 'public-inbox'; @@ -87,11 +85,11 @@ sub _html_end { my (%seen, @urls); my $http = $ibx->base_url($ctx->{env}); chop $http; # no trailing slash for clone - my $part = $ibx->max_git_part; + my $max = $ibx->max_git_epoch; my $dir = (split(m!/!, $http))[-1]; - if (defined($part)) { # v2 + if (defined($max)) { # v2 $seen{$http} = 1; - for my $i (0..$part) { + for my $i (0..$max) { # old parts my be deleted: -d "$ibx->{mainrepo}/git/$i.git" or next; my $url = "$http/$i"; @@ -103,7 +101,7 @@ sub _html_end { push @urls, $http; } - # FIXME: partitioning in can be different in other repositories, + # FIXME: epoch splits can be different in other repositories, # use the "cloneurl" file as-is for now: foreach my $u (@{$ibx->cloneurl}) { next if $seen{$u}; @@ -111,13 +109,13 @@ sub _html_end { push @urls, $u =~ /\Ahttps?:/ ? qq($u) : $u; } - if (defined($part) || scalar(@urls) > 1) { + if (defined($max) || scalar(@urls) > 1) { $urls .= "\n" . join("\n", map { "\tgit clone --mirror $_" } @urls); } else { $urls .= " git clone --mirror $urls[0]"; } - if (defined $part) { + if (defined $max) { my $addrs = $ibx->{address}; $addrs = join(' ', @$addrs) if ref($addrs) eq 'ARRAY'; $urls .= <$TOR_URL]; - if ($TOR2WEB_URL) { - $urls .= "\n or Tor2web: "; - $urls .= qq[$TOR2WEB_URL]; - } } '
'.join("\n\n",
 		$desc,