Patchwork [1,of,5] hghave: use util.getfstype

login
register
mail settings
Submitter Yuya Nishihara
Date March 25, 2017, 10:38 a.m.
Message ID <32202fca1b0a8f3dd4de.1490438327@mimosa>
Download mbox | patch
Permalink /patch/19663/
State Accepted
Headers show

Comments

Yuya Nishihara - March 25, 2017, 10:38 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1490433747 -32400
#      Sat Mar 25 18:22:27 2017 +0900
# Node ID 32202fca1b0a8f3dd4debb9b35daff002c454f75
# Parent  c60091fa1426892552dd6c0dd4b9c49e3c3da045
hghave: use util.getfstype

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -348,8 +348,8 @@  def has_hardlink():
 
 @check("hardlink-whitelisted", "hardlinks on whitelisted filesystems")
 def has_hardlink_whitelisted():
-    from mercurial import osutil, util
-    fstype = getattr(osutil, 'getfstype', lambda x: None)('.')
+    from mercurial import util
+    fstype = util.getfstype('.')
     return fstype in util._hardlinkfswhitelist
 
 @check("rmcwd", "can remove current working directory")