--- a/mercurial/upgrade.py Sat May 26 12:14:04 2018 +0900
+++ b/mercurial/upgrade.py Sat May 26 12:20:36 2018 +0900
@@ -8,7 +8,6 @@
from __future__ import absolute_import
import stat
-import tempfile
from .i18n import _
from . import (
@@ -18,6 +17,7 @@
hg,
localrepo,
manifest,
+ pycompat,
revlog,
scmutil,
util,
@@ -657,7 +657,7 @@
ui.write(_('data fully migrated to temporary repository\n'))
- backuppath = tempfile.mkdtemp(prefix='upgradebackup.', dir=srcrepo.path)
+ backuppath = pycompat.mkdtemp(prefix='upgradebackup.', dir=srcrepo.path)
backupvfs = vfsmod.vfs(backuppath)
# Make a backup of requires file first, as it is the first to be modified.
@@ -842,7 +842,7 @@
# data. There are less heavyweight ways to do this, but it is easier
# to create a new repo object than to instantiate all the components
# (like the store) separately.
- tmppath = tempfile.mkdtemp(prefix='upgrade.', dir=repo.path)
+ tmppath = pycompat.mkdtemp(prefix='upgrade.', dir=repo.path)
backuppath = None
try:
ui.write(_('creating temporary repository to stage migrated '