Mercurial > hg-stable
view .arcconfig @ 45329: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 | ff396501e841 |
children |
line wrap: on
line source
{ "conduit_uri": "https://phab.mercurial-scm.org/api", "phabricator.uri": "https://phab.mercurial-scm.org/", "repository.callsign": "HG", "arc.land.onto.default": "@", "base": "hg:.^" }