# HG changeset patch # User Augie Fackler # Date 2019-01-16 15:55:42 # Node ID 312afd164009c33b0487f57818ad7e226abc2020 # Parent a89b20a49c13c504ef9c60a8c903905e34723070 remotefilelog: do file IO in terms of bytes Differential Revision: https://phab.mercurial-scm.org/D5597 diff --git a/hgext/remotefilelog/__init__.py b/hgext/remotefilelog/__init__.py --- a/hgext/remotefilelog/__init__.py +++ b/hgext/remotefilelog/__init__.py @@ -804,7 +804,7 @@ def gcclient(ui, cachepath): ui.warn(_("no known cache at %s\n") % cachepath) return - reposfile = open(repospath, 'r') + reposfile = open(repospath, 'rb') repos = set([r[:-1] for r in reposfile.readlines()]) reposfile.close() @@ -874,7 +874,7 @@ def gcclient(ui, cachepath): # write list of valid repos back oldumask = os.umask(0o002) try: - reposfile = open(repospath, 'w') + reposfile = open(repospath, 'wb') reposfile.writelines([("%s\n" % r) for r in validrepos]) reposfile.close() finally: