mercurial/debugcommands.py
changeset 38166 cc9aa88792fe
parent 38164 aac4be30e250
child 38239 ead71b15efd5
equal deleted inserted replaced
38165:2ce60954b1b7 38166:cc9aa88792fe
    19 import ssl
    19 import ssl
    20 import stat
    20 import stat
    21 import string
    21 import string
    22 import subprocess
    22 import subprocess
    23 import sys
    23 import sys
    24 import tempfile
       
    25 import time
    24 import time
    26 
    25 
    27 from .i18n import _
    26 from .i18n import _
    28 from .node import (
    27 from .node import (
    29     bin,
    28     bin,
   968     ui.write(('fstype: %s\n') % (util.getfstype(path) or '(unknown)'))
   967     ui.write(('fstype: %s\n') % (util.getfstype(path) or '(unknown)'))
   969     ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no'))
   968     ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no'))
   970     ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no'))
   969     ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no'))
   971     casesensitive = '(unknown)'
   970     casesensitive = '(unknown)'
   972     try:
   971     try:
   973         with tempfile.NamedTemporaryFile(prefix='.debugfsinfo', dir=path) as f:
   972         with pycompat.namedtempfile(prefix='.debugfsinfo', dir=path) as f:
   974             casesensitive = util.fscasesensitive(f.name) and 'yes' or 'no'
   973             casesensitive = util.fscasesensitive(f.name) and 'yes' or 'no'
   975     except OSError:
   974     except OSError:
   976         pass
   975         pass
   977     ui.write(('case-sensitive: %s\n') % casesensitive)
   976     ui.write(('case-sensitive: %s\n') % casesensitive)
   978 
   977