Mercurial > hg
changeset 31578:6262e30b0c09
debugfsinfo: print fstype information
Since we have osutil.getfstype, it'll be handy if "debugfsinfo" prints it.
author | Jun Wu <quark@fb.com> |
---|---|
date | Sun, 12 Mar 2017 01:34:17 -0800 |
parents | e7a02e9ad162 |
children | 3a383caa97f4 |
files | mercurial/debugcommands.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/debugcommands.py Sun Mar 12 01:03:23 2017 -0800 +++ b/mercurial/debugcommands.py Sun Mar 12 01:34:17 2017 -0800 @@ -790,6 +790,10 @@ """show information detected about current filesystem""" util.writefile('.debugfsinfo', '') ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no')) + from . import osutil + if util.safehasattr(osutil, 'getfstype'): + fstype = osutil.getfstype('.') + ui.write(('fstype: %s\n') % (fstype or '(unknown)')) ui.write(('symlink: %s\n') % (util.checklink(path) and 'yes' or 'no')) ui.write(('hardlink: %s\n') % (util.checknlink(path) and 'yes' or 'no')) ui.write(('case-sensitive: %s\n') % (util.fscasesensitive('.debugfsinfo')