##// END OF EJS Templates
util: add allowhardlinks module variable...
Durham Goode -
r31141:b4cd912d default
parent child Browse files
Show More
@@ -1056,6 +1056,11 b' def checksignature(func):'
1056
1056
1057 return check
1057 return check
1058
1058
1059 # Hardlinks are problematic on CIFS, do not allow hardlinks
1060 # until we find a way to work around it cleanly (issue4546).
1061 # This is a variable so extensions can opt-in to using them.
1062 allowhardlinks = False
1063
1059 def copyfile(src, dest, hardlink=False, copystat=False, checkambig=False):
1064 def copyfile(src, dest, hardlink=False, copystat=False, checkambig=False):
1060 '''copy a file, preserving mode and optionally other stat info like
1065 '''copy a file, preserving mode and optionally other stat info like
1061 atime/mtime
1066 atime/mtime
@@ -1072,9 +1077,7 b' def copyfile(src, dest, hardlink=False, '
1072 if checkambig:
1077 if checkambig:
1073 oldstat = checkambig and filestat(dest)
1078 oldstat = checkambig and filestat(dest)
1074 unlink(dest)
1079 unlink(dest)
1075 # hardlinks are problematic on CIFS, quietly ignore this flag
1080 if allowhardlinks and hardlink:
1076 # until we find a way to work around it cleanly (issue4546)
1077 if False and hardlink:
1078 try:
1081 try:
1079 oslink(src, dest)
1082 oslink(src, dest)
1080 return
1083 return
General Comments 0
You need to be logged in to leave comments. Login now