diff -r aac4be30e250 -r 2ce60954b1b7 mercurial/pycompat.py --- a/mercurial/pycompat.py Sat May 26 12:14:04 2018 +0900 +++ b/mercurial/pycompat.py Sat May 26 12:20:36 2018 +0900 @@ -386,6 +386,9 @@ def gnugetoptb(args, shortlist, namelist): return _getoptbwrapper(getopt.gnu_getopt, args, shortlist, namelist) +def mkdtemp(suffix=b'', prefix=b'tmp', dir=None): + return tempfile.mkdtemp(suffix, prefix, dir) + # text=True is not supported; use util.from/tonativeeol() instead def mkstemp(suffix=b'', prefix=b'tmp', dir=None): return tempfile.mkstemp(suffix, prefix, dir)