Mercurial > hg
diff mercurial/templater.py @ 45261:28840ef52f71
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 22 Jul 2020 21:23:46 -0700 |
parents | 9a308336fe41 |
children | b7444cfc2c05 |
line wrap: on
line diff
--- a/mercurial/templater.py Thu Jul 23 22:50:20 2020 -0700 +++ b/mercurial/templater.py Wed Jul 22 21:23:46 2020 -0700 @@ -848,17 +848,17 @@ 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