changeset 41248:312afd164009

remotefilelog: do file IO in terms of bytes Differential Revision: https://phab.mercurial-scm.org/D5597
author Augie Fackler <augie@google.com>
date Wed, 16 Jan 2019 10:55:42 -0500
parents a89b20a49c13
children c891a11ffe27
files hgext/remotefilelog/__init__.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/remotefilelog/__init__.py	Fri Nov 30 14:35:57 2018 +0100
+++ b/hgext/remotefilelog/__init__.py	Wed Jan 16 10:55:42 2019 -0500
@@ -804,7 +804,7 @@
         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 @@
     # 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: