diff --git a/mercurial/pycompat.py b/mercurial/pycompat.py --- a/mercurial/pycompat.py +++ b/mercurial/pycompat.py @@ -510,7 +510,7 @@ # This wrapper file are always open in byte mode. def unnamedtempfile(mode=None, *args, **kwargs): if mode is None: - mode = b'w+b' + mode = 'w+b' else: mode = sysstr(mode) assert 'b' in mode