Mercurial > hg-stable
changeset 35587:f2f0a777b2e2
py3: make sure we open the file to write in bytes mode
Differential Revision: https://phab.mercurial-scm.org/D1797
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 29 Dec 2017 05:29:57 +0530 |
parents | fbf1a5d680ea |
children | dadbf213a765 |
files | mercurial/subrepo.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/subrepo.py Fri Dec 29 05:47:17 2017 +0530 +++ b/mercurial/subrepo.py Fri Dec 29 05:29:57 2017 +0530 @@ -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: