--- a/mercurial/hgweb/webcommands.py Mon Aug 03 22:40:05 2020 -0700
+++ b/mercurial/hgweb/webcommands.py Sat Aug 22 16:03:44 2020 -0700
@@ -36,7 +36,6 @@
revsetlang,
scmutil,
smartset,
- templater,
templateutil,
)
@@ -1318,12 +1317,7 @@
# a repo owner may set web.static in .hg/hgrc to get any file
# readable by the user running the CGI script
static = web.config(b"web", b"static", untrusted=False)
- if not static:
- tp = web.templatepath or templater.templatedir()
- if tp is not None:
- static = os.path.join(tp, b'static')
-
- staticfile(static, fname, web.res)
+ staticfile(web.templatepath, static, fname, web.res)
return web.res.sendresponse()