Mercurial > public > mercurial-scm > hg-stable
diff mercurial/patch.py @ 38198:2ce60954b1b7
py3: wrap tempfile.mkdtemp() to use bytes path
This also flips the default to use a bytes path on Python 3.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 26 May 2018 12:20:36 +0900 |
parents | aac4be30e250 |
children | f47608575c10 |
line wrap: on
line diff
--- a/mercurial/patch.py Sat May 26 12:14:04 2018 +0900 +++ b/mercurial/patch.py Sat May 26 12:20:36 2018 +0900 @@ -18,7 +18,6 @@ import posixpath import re import shutil -import tempfile import zlib from .i18n import _ @@ -573,7 +572,7 @@ self.size += len(data) else: if self.opener is None: - root = tempfile.mkdtemp(prefix='hg-patch-') + root = pycompat.mkdtemp(prefix='hg-patch-') self.opener = vfsmod.vfs(root) # Avoid filename issues with these simple names fn = '%d' % self.created