# HG changeset patch # User Patrick Mezard # Date 2011-05-07 19:12:35 # Node ID 34ec9b313638b8930cec1dc77149893b5b892895 # Parent f4766e1bb0b35616b05fe45dd92b8dfd6ae5d2b5 util: make readfile() operate in binary mode writefile() and appendfile() are already working that way. diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -772,7 +772,7 @@ def makedirs(name, mode=None): makedirs(name, mode) def readfile(path): - fp = open(path) + fp = open(path, 'rb') try: return fp.read() finally: