Update hgweb to Python 3.
--- a/deb/apache-register-hg.bash Mon Jul 31 01:24:19 2023 +0300
+++ b/deb/apache-register-hg.bash Sat Dec 23 21:19:31 2023 +0200
@@ -9,14 +9,20 @@
chown user:user /srv/hg
cat <<EOF >/srv/hg/hgweb.cgi
-#!/usr/bin/env python
+#!/usr/bin/env python3
# See also https://mercurial-scm.org/wiki/PublishingRepositories
# Path to repo or hgweb config to serve (see 'hg help hgweb')
-config = "/srv/hg/hgweb.config"
+config = b"/srv/hg/hgweb.config"
+
+# Uncomment to send python tracebacks to the browser if an error occurs:
+# import cgitb; cgitb.enable()
-from mercurial import demandimport; demandimport.enable()
+from mercurial import demandimport
+demandimport.enable()
+
from mercurial.hgweb import hgweb, wsgicgi
+
application = hgweb(config)
wsgicgi.launch(application)
EOF