diff --git a/hgext/convert/gnuarch.py b/hgext/convert/gnuarch.py index 85a474adaf26d07c408a956c7e5d7d7c0eff072a_aGdleHQvY29udmVydC9nbnVhcmNoLnB5..28626957395a97e61609ff0a405c40665c019f36_aGdleHQvY29udmVydC9nbnVhcmNoLnB5 100644 --- a/hgext/convert/gnuarch.py +++ b/hgext/convert/gnuarch.py @@ -18,6 +18,7 @@ encoding, error, pycompat, + util, ) from mercurial.utils import ( dateutil, @@ -228,7 +229,7 @@ else: mode = '' else: - data = open(os.path.join(self.tmppath, name), 'rb').read() + data = util.readfile(os.path.join(self.tmppath, name)) mode = (mode & 0o111) and 'x' or '' return data, mode