# HG changeset patch # User Yuya Nishihara # Date 2017-05-06 05:48:47 # Node ID 470820c2418d4427ac3790cfa957f475a2710527 # Parent 8016fe56a29e2f7ec49523694683998b8fd3149e formatter: open raw template file in posix semantics This should have no effect, but seems good for code consistency. diff --git a/mercurial/formatter.py b/mercurial/formatter.py --- a/mercurial/formatter.py +++ b/mercurial/formatter.py @@ -399,7 +399,7 @@ def lookuptemplate(ui, topic, tmpl): # 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