diff -r b39958d6b81b -r aac4be30e250 mercurial/streamclone.py --- 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)