[prev in list] [next in list] [prev in thread] [next in thread]
List: mercurial-devel
Subject: D1797: py3: make sure we open the file to write in bytes mode
From: "pulkit (Pulkit Goyal)" <phabricator () mercurial-scm ! org>
Date: 2017-12-29 0:50:03
Message-ID: differential-rev-PHID-DREV-rnq7xuujgdk2dcy3o4om-req () phab ! mercurial-scm ! org
[Download RAW message or body]
pulkit created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1797
AFFECTED FILES
mercurial/subrepo.py
CHANGE DETAILS
diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -811,7 +811,7 @@
with self._repo.lock():
storehash = list(self._calcstorehash(remotepath))
vfs = self._cachestorehashvfs
- vfs.writelines(cachefile, storehash, mode='w', notindexed=True)
+ vfs.writelines(cachefile, storehash, mode='wb', notindexed=True)
def _getctx(self):
'''fetch the context for this subrepo revision, possibly a workingctx
@@ -841,7 +841,7 @@
if defpath != defpushpath:
addpathconfig('default-push', defpushpath)
- fp = self._repo.vfs("hgrc", "w", text=True)
+ fp = self._repo.vfs("hgrc", "wb", text=True)
try:
fp.write(''.join(lines))
finally:
To: pulkit, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic