]> Sergey Matveev's repositories - public-inbox.git/commit
lei add-external --mirror: deduce paths for PSGI mount prefixes
authorEric Wong <e@80x24.org>
Fri, 10 Sep 2021 05:51:00 +0000 (05:51 +0000)
committerEric Wong <e@80x24.org>
Fri, 10 Sep 2021 08:24:49 +0000 (08:24 +0000)
commitde39bfcb19571f5c723c03d35a26a7af2e03d993
treef8d516cc22d36bf35ca5438f2f9be7be38f11eb8
parenteb8c28ea18be00a8772b92f9840a5f68a31378f7
lei add-external --mirror: deduce paths for PSGI mount prefixes

The current manifest.js.gz generation in WWW doesn't account for
PSGI mount prefixes (and grokmirror 1.x appears to work fine).

In other words, <https://yhbt.net/lore/lkml/manifest.js.gz>
currently has keys like "/lkml/git/0.git" and not
"/lore/lkml/git/0.git" where "/lore" is the PSGI mount prefix.
This works fine with the prefix accounted for in my grokmirror
(1.x) repos.conf like this:

site = https://yhbt.net/lore/
manifest = https://yhbt.net/lore/manifest.js.gz

Adding the PSGI mount prefix in manifest.js.gz is probably not
desirable since it would force the prefix into the locally
cloned path by grokmirror, and all the cloned directories
would have the remote PSGI mount prefix prepended to the
toplevel.

So, "lei add-external --mirror" needs to account for PSGI
mount prefixes by deducing the prefix based on available keys
in the manifest.js.gz hash table.
MANIFEST
lib/PublicInbox/LeiMirror.pm
t/lei-mirror.psgi [new file with mode: 0644]
t/lei-mirror.t