##// END OF EJS Templates
debugfsinfo: improve case-sensitive testing...
Jun Wu -
r31634:35738db2 default
parent child Browse files
Show More
@@ -788,14 +788,17 def debugfileset(ui, repo, expr, **opts)
788 @command('debugfsinfo', [], _('[PATH]'), norepo=True)
788 @command('debugfsinfo', [], _('[PATH]'), norepo=True)
789 def debugfsinfo(ui, path="."):
789 def debugfsinfo(ui, path="."):
790 """show information detected about current filesystem"""
790 """show information detected about current filesystem"""
791 util.writefile('.debugfsinfo', '')
792 ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no'))
791 ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no'))
793 ui.write(('fstype: %s\n') % (util.getfstype(path) or '(unknown)'))
792 ui.write(('fstype: %s\n') % (util.getfstype(path) or '(unknown)'))
794 ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no'))
793 ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no'))
795 ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no'))
794 ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no'))
796 ui.write(('case-sensitive: %s\n') % (util.fscasesensitive('.debugfsinfo')
795 casesensitive = '(unknown)'
797 and 'yes' or 'no'))
796 try:
798 util.tryunlink('.debugfsinfo')
797 with tempfile.NamedTemporaryFile(prefix='.debugfsinfo', dir=path) as f:
798 casesensitive = util.fscasesensitive(f.name) and 'yes' or 'no'
799 except OSError:
800 pass
801 ui.write(('case-sensitive: %s\n') % casesensitive)
799
802
800 @command('debuggetbundle',
803 @command('debuggetbundle',
801 [('H', 'head', [], _('id of head node'), _('ID')),
804 [('H', 'head', [], _('id of head node'), _('ID')),
General Comments 0
You need to be logged in to leave comments. Login now