Jun Wu <quark@fb.com> [Sun, 12 Mar 2017 01:03:23 -0800] rev 31577
util: enable hardlink for copyfile
This patch removes the global variable "allowhardlinks" that disables
hardlink in all cases, so hardlink gets enabled if the filesystem type is
whitelisted.
Third party extensions wanting to enable hardlink support unconditionally
can replace "_hardlinkfswhitelist.__contains__".
Jun Wu <quark@fb.com> [Sun, 12 Mar 2017 00:26:20 -0800] rev 31576
hghave: add a check about whitelisted filesystem that supports hardlink
This is needed for the test added by the next patch.
Jun Wu <quark@fb.com> [Sun, 12 Mar 2017 00:23:07 -0800] rev 31575
util: disable hardlink for copyfile if fstype is outside a whitelist
Since osutil.getfstype is available, use it to detect filesystem types. The
whitelist currently includes common local filesystems on Linux where they
should have good hardlink support. We may add new filesystems for other
platforms later.