Patchwork D5597: remotefilelog: do file IO in terms of bytes

login
register
mail settings
Submitter phabricator
Date Jan. 16, 2019, 5:21 p.m.
Message ID <ecbe6ccfd87671ca1d543769ed03dbda@localhost.localdomain>
Download mbox | patch
Permalink /patch/37818/
State Not Applicable
Headers show

Comments

phabricator - Jan. 16, 2019, 5:21 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG312afd164009: remotefilelog: do file IO in terms of bytes (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5597?vs=13257&id=13278

REVISION DETAIL
  https://phab.mercurial-scm.org/D5597

AFFECTED FILES
  hgext/remotefilelog/__init__.py

CHANGE DETAILS




To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

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 @@ 
         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: