# HG changeset patch # User Jun Wu # Date 1490295678 25200 # Node ID 4a1bf30f543871fee5283d99f7e86ba3598fa463 # Parent ae02cc1f5369338aebd1e2c5d4dec14a771cc297 util: use util.getfstype diff -r ae02cc1f5369 -r 4a1bf30f5438 mercurial/util.py --- a/mercurial/util.py Thu Mar 23 11:58:45 2017 -0700 +++ b/mercurial/util.py Thu Mar 23 12:01:18 2017 -0700 @@ -1086,8 +1086,7 @@ if hardlink: # Hardlinks are problematic on CIFS (issue4546), do not allow hardlinks # unless we are confident that dest is on a whitelisted filesystem. - destdir = os.path.dirname(dest) - fstype = getattr(osutil, 'getfstype', lambda x: None)(destdir) + fstype = getfstype(os.path.dirname(dest)) if fstype not in _hardlinkfswhitelist: hardlink = False if hardlink: