changeset 40258:2f47703c5489

context: open files in bytes mode I'm stunned this open() call has survived this long without the b in the mode - it seems like it should have been a source of bugs somewhere... Differential Revision: https://phab.mercurial-scm.org/D5080
author Augie Fackler <augie@google.com>
date Sat, 13 Oct 2018 08:54:31 -0400
parents c3970be8deca
children 5519697b71b3
files mercurial/context.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Sat Oct 13 09:45:49 2018 -0400
+++ b/mercurial/context.py	Sat Oct 13 08:54:31 2018 -0400
@@ -2433,5 +2433,5 @@
 
     def write(self, data, flags, **kwargs):
         assert not flags
-        with open(self._path, "w") as f:
+        with open(self._path, "wb") as f:
             f.write(data)