The "show" style is an example of a style that uses an "%include"
statement in its definition. This patch makes hg log --style show
work.
This takes the number of failing tests with PyOxidizer from 72 to 62.
indygreg |
hg-reviewers |
The "show" style is an example of a style that uses an "%include"
statement in its definition. This patch makes hg log --style show
work.
This takes the number of failing tests with PyOxidizer from 72 to 62.
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/templater.py (16 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
403b1720b148 | 8390e533cf61 | Martin von Zweigbergk | Jul 31 2020, 12:36 AM |
Status | Author | Revision | |
---|---|---|---|
Abandoned | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz |
def include(rel, remap, sections): | def include(rel, remap, sections): | ||||
subresource = None | subresource = None | ||||
if base: | if base: | ||||
abs = os.path.normpath(os.path.join(base, rel)) | abs = os.path.normpath(os.path.join(base, rel)) | ||||
if os.path.isfile(abs): | if os.path.isfile(abs): | ||||
subresource = util.posixfile(abs, b'rb') | subresource = util.posixfile(abs, b'rb') | ||||
if not subresource: | if not subresource: | ||||
if pycompat.ossep not in rel: | |||||
abs = rel | |||||
subresource = resourceutil.open_resource( | |||||
b'mercurial.templates', rel | |||||
) | |||||
else: | |||||
dir = templatedir() | dir = templatedir() | ||||
if dir: | if dir: | ||||
abs = os.path.normpath(os.path.join(dir, rel)) | abs = os.path.normpath(os.path.join(dir, rel)) | ||||
if os.path.isfile(abs): | if os.path.isfile(abs): | ||||
subresource = util.posixfile(abs, b'rb') | subresource = util.posixfile(abs, b'rb') | ||||
if subresource: | if subresource: | ||||
data = subresource.read() | data = subresource.read() | ||||
conf.parse( | conf.parse( | ||||
abs, data, sections=sections, remap=remap, include=include, | abs, data, sections=sections, remap=remap, include=include, | ||||
) | ) | ||||
data = fp.read() | data = fp.read() | ||||
conf.parse(mapfile, data, remap={b'': b'templates'}, include=include) | conf.parse(mapfile, data, remap={b'': b'templates'}, include=include) |