D5080: context: open files in bytes mode

2018-10-13 Thread durin42 (Augie Fackler)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2f47703c5489: context: open files in bytes mode (authored 
by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5080?vs=12072&id=12085

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -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)



To: durin42, #hg-reviewers, pulkit
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5080: context: open files in bytes mode

2018-10-13 Thread durin42 (Augie Fackler)
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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...

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -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)



To: durin42, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel