Mercurial > public > mercurial-scm > hg
comparison mercurial/hgweb/hgwebdir_mod.py @ 39793:536f22d6c2c5
hgweb: register web.static to the config table
Otherwise we would got a develwarn.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 23 Sep 2018 16:15:48 +0900 |
parents | 4167437a45dd |
children | 2cd5f1fac788 |
comparison
equal
deleted
inserted
replaced
39792:ff0060d2a099 | 39793:536f22d6c2c5 |
---|---|
381 if virtual.startswith('static/') or 'static' in req.qsparams: | 381 if virtual.startswith('static/') or 'static' in req.qsparams: |
382 if virtual.startswith('static/'): | 382 if virtual.startswith('static/'): |
383 fname = virtual[7:] | 383 fname = virtual[7:] |
384 else: | 384 else: |
385 fname = req.qsparams['static'] | 385 fname = req.qsparams['static'] |
386 static = self.ui.config("web", "static", None, | 386 static = self.ui.config("web", "static", untrusted=False) |
387 untrusted=False) | |
388 if not static: | 387 if not static: |
389 tp = self.templatepath or templater.templatepaths() | 388 tp = self.templatepath or templater.templatepaths() |
390 if isinstance(tp, str): | 389 if isinstance(tp, str): |
391 tp = [tp] | 390 tp = [tp] |
392 static = [os.path.join(p, 'static') for p in tp] | 391 static = [os.path.join(p, 'static') for p in tp] |