diff -r 2ce60954b1b7 -r cc9aa88792fe mercurial/debugcommands.py --- a/mercurial/debugcommands.py Sat May 26 12:20:36 2018 +0900 +++ b/mercurial/debugcommands.py Sat May 26 12:38:07 2018 +0900 @@ -21,7 +21,6 @@ import string import subprocess import sys -import tempfile import time from .i18n import _ @@ -970,7 +969,7 @@ ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no')) casesensitive = '(unknown)' try: - with tempfile.NamedTemporaryFile(prefix='.debugfsinfo', dir=path) as f: + with pycompat.namedtempfile(prefix='.debugfsinfo', dir=path) as f: casesensitive = util.fscasesensitive(f.name) and 'yes' or 'no' except OSError: pass