This is an archive of the discontinued Mercurial Phabricator instance.

templater: replace templatepath() with function that also opens the file
ClosedPublic

Authored by martinvonz on Aug 5 2020, 12:26 PM.

Details

Summary

For frozen binaries, such as those created by PyOxidizer, I plan to
make it so the templatespec can keep an opened file/resource to read
from instead of needing a file path. Having templatepath() return an
opened file should help with that. At this point, it's just a wasteful
extra opening of mapfiles that we'll open again later. I'll update the
read-side next so it reads from the file-like object without opening
the file again.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.