comparison mercurial/debugcommands.py @ 31633:5b3d55a6821f

debugfsinfo: show fstype for given path
author Jun Wu <quark@fb.com>
date Sun, 26 Mar 2017 17:29:37 -0700
parents e8bd005c0af7
children 35738db2037a
comparison
equal deleted inserted replaced
31632:d059821fc89f 31633:5b3d55a6821f
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', '') 791 util.writefile('.debugfsinfo', '')
792 ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no')) 792 ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no'))
793 ui.write(('fstype: %s\n') % (util.getfstype('.') or '(unknown)')) 793 ui.write(('fstype: %s\n') % (util.getfstype(path) or '(unknown)'))
794 ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no')) 794 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')) 795 ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no'))
796 ui.write(('case-sensitive: %s\n') % (util.fscasesensitive('.debugfsinfo') 796 ui.write(('case-sensitive: %s\n') % (util.fscasesensitive('.debugfsinfo')
797 and 'yes' or 'no')) 797 and 'yes' or 'no'))
798 util.tryunlink('.debugfsinfo') 798 util.tryunlink('.debugfsinfo')