Mercurial > public > mercurial-scm > hg-stable
diff mercurial/streamclone.py @ 38197:aac4be30e250
py3: wrap tempfile.mkstemp() to use bytes path
This patch just flips the default to use a bytes path on Python 3.
ca1cf9b3cce7 is backed out as the bundlepath should be bytes now.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 26 May 2018 12:14:04 +0900 |
parents | 65b86ee69383 |
children | e59eaf51cc0d |
line wrap: on
line diff
--- a/mercurial/streamclone.py Thu May 03 18:39:58 2018 +0900 +++ b/mercurial/streamclone.py Sat May 26 12:14:04 2018 +0900 @@ -10,7 +10,6 @@ import contextlib import os import struct -import tempfile import warnings from .i18n import _ @@ -19,6 +18,7 @@ cacheutil, error, phases, + pycompat, store, util, ) @@ -469,7 +469,7 @@ files = [] try: def copy(src): - fd, dst = tempfile.mkstemp() + fd, dst = pycompat.mkstemp() os.close(fd) files.append(dst) util.copyfiles(src, dst, hardlink=True)