formatter: open raw template file in posix semantics
authorYuya Nishihara <yuya@tcha.org>
Sat, 06 May 2017 14:48:47 +0900
changeset 32830 470820c2418d
parent 32829 8016fe56a29e
child 32831 de7dc25ecf2e
formatter: open raw template file in posix semantics This should have no effect, but seems good for code consistency.
mercurial/formatter.py
--- a/mercurial/formatter.py	Sat May 06 14:47:31 2017 +0900
+++ b/mercurial/formatter.py	Sat May 06 14:48:47 2017 +0900
@@ -399,7 +399,7 @@
         # is it a mapfile for a style?
         if os.path.basename(tmpl).startswith("map-"):
             return None, os.path.realpath(tmpl)
-        with open(tmpl, 'rb') as f:
+        with util.posixfile(tmpl, 'rb') as f:
             tmpl = f.read()
         return tmpl, None