changeset 31595:e8bd005c0af7

debugfsinfo: use util.getfstype This changes the behavior slightly. It now always prints fstype, regardless of whether osutil.getfstype exists.
author Jun Wu <quark@fb.com>
date Thu, 23 Mar 2017 12:03:19 -0700
parents 4a1bf30f5438
children ab51a2b18f87
files mercurial/debugcommands.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/debugcommands.py	Thu Mar 23 12:01:18 2017 -0700
+++ b/mercurial/debugcommands.py	Thu Mar 23 12:03:19 2017 -0700
@@ -790,10 +790,7 @@
     """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(('fstype: %s\n') % (util.getfstype('.') 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')