Mercurial > hg > mercurial-source
diff tests/hghave.py @ 32355:07f0cddb0594
hghave: add a check about whitelisted filesystem that supports hardlink
This is needed for the test added by the next patch.
author | Jun Wu <quark@fb.com> |
---|---|
date | Sun, 12 Mar 2017 00:26:20 -0800 |
parents | aa797bd54f44 |
children | b33e352c365c |
line wrap: on
line diff
--- a/tests/hghave.py +++ b/tests/hghave.py @@ -346,6 +346,12 @@ 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()