# HG changeset patch # User Jun Wu # Date 2017-03-12 08:26:20 # Node ID 07f0cddb0594cf7dba03a061ccb223fe5faf0bf3 # Parent e506e461c7a93735da8233ba0a3aa0ccf43f7859 hghave: add a check about whitelisted filesystem that supports hardlink This is needed for the test added by the next patch. diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -346,6 +346,12 @@ def has_hardlink(): finally: os.unlink(fn) +@check("hardlink-whitelisted", "hardlinks on whitelisted filesystems") +def has_hardlink_whitelisted(): + from mercurial import osutil, util + fstype = getattr(osutil, 'getfstype', lambda x: None)('.') + return fstype in util._hardlinkfswhitelist + @check("rmcwd", "can remove current working directory") def has_rmcwd(): ocwd = os.getcwd()