# HG changeset patch # User Martin von Zweigbergk # Date 2020-07-23 04:23:46 # Node ID 28840ef52f7179c2e403e96d09a9ff2396d95cf1 # Parent 653b2a43941247192d6b3f645b01813064cf8755 templater: don't normalize path separators to '/' when interacting with OS `_readmapfile()` is about reading a map file from the file system, so we shouldn't use our `util.normpath()`, which also normalizes `os.sep` to '/'. Differential Revision: https://phab.mercurial-scm.org/D8806 diff --git a/mercurial/templater.py b/mercurial/templater.py --- a/mercurial/templater.py +++ b/mercurial/templater.py @@ -848,17 +848,17 @@ def _readmapfile(mapfile): val = conf.get(b'templates', b'__base__') if val and val[0] not in b"'\"": # treat as a pointer to a base class for this style - path = util.normpath(os.path.join(base, val)) + path = os.path.normpath(os.path.join(base, val)) # fallback check in template paths if not os.path.exists(path): dir = templatedir() if dir is not None: - p2 = util.normpath(os.path.join(dir, val)) + p2 = os.path.normpath(os.path.join(dir, val)) if os.path.isfile(p2): path = p2 else: - p3 = util.normpath(os.path.join(p2, b"map")) + p3 = os.path.normpath(os.path.join(p2, b"map")) if os.path.isfile(p3): path = p3