[PATCH 4 of 4 V2] debugfsinfo: print fstype information

Jun Wu quark at fb.com
Tue Mar 21 22:00:56 EDT 2017


# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1489311257 28800
#      Sun Mar 12 01:34:17 2017 -0800
# Node ID ea4573691618ea1937cfe0c03c6caa4693b64b05
# Parent  e960baabf0da65e84e99466d4be9acaa4b9b91b2
# Available At https://bitbucket.org/quark-zju/hg-draft
#              hg pull https://bitbucket.org/quark-zju/hg-draft -r ea4573691618
debugfsinfo: print fstype information

Since we have osutil.getfstype, it'll be handy if "debugfsinfo" prints it.

diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -791,4 +791,8 @@ def debugfsinfo(ui, path="."):
     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'))


More information about the Mercurial-devel mailing list