Mercurial > hg
comparison contrib/win32/hgwebdir_wsgi.py @ 45308:dc10bcd5c08d
templater: start passing resource to read from into _readmapfile()
This patch makes it so we pass in a file-like resource to read from
instead of having `_readmapfile()` open the file. This is one more
step towards making `_readmapfile()` able to read resources opened by
from `importlib.resources`. We still need to pass in the mapfile path
because it's used for loading dependent mapfiles from `%include` and
`__base__`, and it's also used for giving the user better error
messages. Besides that, one can safely call `_readmapfile()` with any
file-like resource after this patch.
Differential Revision: https://phab.mercurial-scm.org/D8891
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 30 Jul 2020 13:44:06 -0700 |
parents | 2372284d9457 |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
45307:ba50c8a95e2b | 45308:dc10bcd5c08d |
---|