equal
deleted
inserted
replaced
1219 @webcommand('static') |
1219 @webcommand('static') |
1220 def static(web): |
1220 def static(web): |
1221 fname = web.req.qsparams['file'] |
1221 fname = web.req.qsparams['file'] |
1222 # a repo owner may set web.static in .hg/hgrc to get any file |
1222 # a repo owner may set web.static in .hg/hgrc to get any file |
1223 # readable by the user running the CGI script |
1223 # readable by the user running the CGI script |
1224 static = web.config("web", "static", None, untrusted=False) |
1224 static = web.config("web", "static", untrusted=False) |
1225 if not static: |
1225 if not static: |
1226 tp = web.templatepath or templater.templatepaths() |
1226 tp = web.templatepath or templater.templatepaths() |
1227 if isinstance(tp, str): |
1227 if isinstance(tp, str): |
1228 tp = [tp] |
1228 tp = [tp] |
1229 static = [os.path.join(p, 'static') for p in tp] |
1229 static = [os.path.join(p, 'static') for p in tp] |