changeset 45285: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 653b2a439412
children 22eafb16f1c5
files mercurial/templater.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
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