Mercurial > hg
comparison mercurial/templater.py @ 47830:981cef5188c3 stable
templater: swap `\` with `/` in more location
This is similar to the previous changeset, but apply that logic to
_readmapfile.
Differential Revision: https://phab.mercurial-scm.org/D11282
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 17 Aug 2021 14:38:25 +0200 |
parents | 7ab7f73a7f0a |
children | f3b1df44b716 |
comparison
equal
deleted
inserted
replaced
47829:7ab7f73a7f0a | 47830:981cef5188c3 |
---|---|
831 ) | 831 ) |
832 | 832 |
833 | 833 |
834 def _readmapfile(fp, mapfile): | 834 def _readmapfile(fp, mapfile): |
835 """Load template elements from the given map file""" | 835 """Load template elements from the given map file""" |
836 if pycompat.iswindows: | |
837 # quick hack to make sure we can process '/' in the code dealing with | |
838 # ressource. Ideally we would make sure we use `/` instead of `ossep` | |
839 # in the templater code, but that seems a bigger and less certain | |
840 # change that we better left for the default branch. | |
841 name_paths = mapfile.split(pycompat.ossep) | |
842 mapfile = b'/'.join(name_paths) | |
836 base = os.path.dirname(mapfile) | 843 base = os.path.dirname(mapfile) |
837 conf = config.config() | 844 conf = config.config() |
838 | 845 |
839 def include(rel, remap, sections): | 846 def include(rel, remap, sections): |
840 subresource = None | 847 subresource = None |