diff -r b39958d6b81b -r aac4be30e250 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Thu May 03 18:39:58 2018 +0900 +++ b/mercurial/cmdutil.py Sat May 26 12:14:04 2018 +0900 @@ -10,7 +10,6 @@ import errno import os import re -import tempfile from .i18n import _ from .node import ( @@ -329,7 +328,7 @@ try: # backup continues for f in tobackup: - fd, tmpname = tempfile.mkstemp(prefix=f.replace('/', '_')+'.', + fd, tmpname = pycompat.mkstemp(prefix=f.replace('/', '_') + '.', dir=backupdir) os.close(fd) ui.debug('backup %r as %r\n' % (f, tmpname))