diff options
author | Arun Isaac | 2023-01-29 16:56:43 +0000 |
---|---|---|
committer | Arun Isaac | 2023-01-29 22:35:53 +0000 |
commit | fb26896560dbdfa80eb517d157e9afd2562e1f8e (patch) | |
tree | 446a52aa79e9d5bbdd0a81ebd3ee60b8e40daee3 /bin | |
parent | 8516e5d0f5b64c681d31efa2944bb9a9de32dbbc (diff) | |
download | tissue-fb26896560dbdfa80eb517d157e9afd2562e1f8e.tar.gz tissue-fb26896560dbdfa80eb517d157e9afd2562e1f8e.tar.lz tissue-fb26896560dbdfa80eb517d157e9afd2562e1f8e.zip |
web: Do not temporarily checkout repository when serving it.
Now that snippet source texts are interred into the xapian index, the
web server does not need a repository checkout.
* bin/tissue (tissue-web): Do not temporarily checkout repositories
being served.
* tissue/web/server.scm (handler): Do not change into repository
directory.
* tissue/git.scm (call-with-temporary-checkouts): Delete function.
* .dir-locals.el (scheme-mode): Unregister it.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/tissue | 41 |
1 files changed, 18 insertions, 23 deletions
@@ -266,29 +266,24 @@ Serve repositories specified in CONFIG-FILE over HTTP. (default-configuration)))) (when (assq-ref args 'listen-repl) (start-repl (assq-ref args 'listen-repl))) - (let* ((state-directory (assq-ref args 'state-directory)) - (hosts (assq-ref args 'hosts))) - (call-with-temporary-checkouts (map (match-lambda - ((name _ ...) - (string-append state-directory "/" name "/repository"))) - hosts) - (lambda checkouts - (start-web-server (listen->socket-address (assq-ref args 'listen)) - (map (match-lambda* - (((name parameters ...) repository-directory) - ;; Add CSS, repository directory, - ;; website directory, xapian - ;; directory settings for each host. - (parameterize ((%current-git-repository - (repository-open repository-directory))) - (cons name - `((project . ,(load-config)) - (repository-directory . ,repository-directory) - (website-directory . ,(string-append state-directory "/" name "/website")) - (xapian-directory . ,(string-append state-directory "/" name "/xapian")) - ,@parameters))))) - hosts - checkouts))))))))) + (start-web-server (listen->socket-address (assq-ref args 'listen)) + (map (match-lambda + ((name parameters ...) + ;; Add CSS, repository directory, + ;; website directory, xapian + ;; directory settings for each host. + (let* ((state-directory (assq-ref args 'state-directory)) + (repository-directory + (string-append state-directory "/" name "/repository"))) + (parameterize ((%current-git-repository + (repository-open repository-directory))) + (cons name + `((project . ,(load-config)) + (repository-directory . ,repository-directory) + (website-directory . ,(string-append state-directory "/" name "/website")) + (xapian-directory . ,(string-append state-directory "/" name "/xapian")) + ,@parameters)))))) + (assq-ref args 'hosts))))))) (define tissue-web-dev (match-lambda* |