comparison mercurial/util.py @ 31598:32f09ead059b

util: enable hardlink for some BSD-family filesystems Since we can now detect filesystems on FreeBSD and OSX. Add their major filesystems (ufs, zfs for FreeBSD; hfs for OSX) to the hardlink whitelist.
author Jun Wu <quark@fb.com>
date Thu, 23 Mar 2017 22:31:50 -0700
parents 4a1bf30f5438
children 080734cd2440
comparison
equal deleted inserted replaced
31597:2d501fb60b2d 31598:32f09ead059b
1059 _hardlinkfswhitelist = set([ 1059 _hardlinkfswhitelist = set([
1060 'btrfs', 1060 'btrfs',
1061 'ext2', 1061 'ext2',
1062 'ext3', 1062 'ext3',
1063 'ext4', 1063 'ext4',
1064 'hfs',
1064 'jfs', 1065 'jfs',
1065 'reiserfs', 1066 'reiserfs',
1066 'tmpfs', 1067 'tmpfs',
1068 'ufs',
1067 'xfs', 1069 'xfs',
1070 'zfs',
1068 ]) 1071 ])
1069 1072
1070 def copyfile(src, dest, hardlink=False, copystat=False, checkambig=False): 1073 def copyfile(src, dest, hardlink=False, copystat=False, checkambig=False):
1071 '''copy a file, preserving mode and optionally other stat info like 1074 '''copy a file, preserving mode and optionally other stat info like
1072 atime/mtime 1075 atime/mtime