##// END OF EJS Templates
templater: do search for include of unqualified builtin outside of config code...
Martin von Zweigbergk -
r45770:4ccd5ec5 default
parent child Browse files
Show More
@@ -823,11 +823,18 b' def _readmapfile(mapfile):'
823 )
823 )
824
824
825 base = os.path.dirname(mapfile)
825 base = os.path.dirname(mapfile)
826 conf = config.config(includepaths=[templatedir()])
826 conf = config.config()
827
827
828 def include(rel, abs, remap, sections):
828 def include(rel, abs, remap, sections):
829 data = util.posixfile(abs, b'rb').read()
829 templatedirs = [base, templatedir()]
830 conf.parse(abs, data, sections=sections, remap=remap, include=include)
830 for dir in templatedirs:
831 abs = os.path.normpath(os.path.join(dir, rel))
832 if os.path.isfile(abs):
833 data = util.posixfile(abs, b'rb').read()
834 conf.parse(
835 abs, data, sections=sections, remap=remap, include=include
836 )
837 break
831
838
832 data = util.posixfile(mapfile, b'rb').read()
839 data = util.posixfile(mapfile, b'rb').read()
833 conf.parse(mapfile, data, remap={b'': b'templates'}, include=include)
840 conf.parse(mapfile, data, remap={b'': b'templates'}, include=include)
General Comments 0
You need to be logged in to leave comments. Login now