[Updated] D8791: templater: switch to lower-level config.parse() in _readmapfile()
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Thu Jul 23 14:55:33 UTC 2020
Closed by commit rHG8ec3062b7047: templater: switch to lower-level config.parse() in _readmapfile() (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8791?vs=22054&id=22077
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8791/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8791
AFFECTED FILES
mercurial/templater.py
CHANGE DETAILS
diff --git a/mercurial/templater.py b/mercurial/templater.py
--- a/mercurial/templater.py
+++ b/mercurial/templater.py
@@ -824,7 +824,13 @@
base = os.path.dirname(mapfile)
conf = config.config(includepaths=[templatedir()])
- conf.read(mapfile, remap={b'': b'templates'})
+
+ def include(rel, abs, remap, sections):
+ data = util.posixfile(abs, b'rb').read()
+ conf.parse(abs, data, sections=sections, remap=remap, include=include)
+
+ data = util.posixfile(mapfile, b'rb').read()
+ conf.parse(mapfile, data, remap={b'': b'templates'}, include=include)
cache = {}
tmap = {}
To: martinvonz, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200723/3eaa3fe4/attachment-0002.html>
More information about the Mercurial-patches
mailing list