mercurial/util.py
branchstable
changeset 24155 e5ce49a30146
parent 23917 3cbb5bf4035d
child 24164 07a92bbd02e5
equal deleted inserted replaced
24154:a41902aac76d 24155:e5ce49a30146
   718 
   718 
   719 def copyfile(src, dest, hardlink=False):
   719 def copyfile(src, dest, hardlink=False):
   720     "copy a file, preserving mode and atime/mtime"
   720     "copy a file, preserving mode and atime/mtime"
   721     if os.path.lexists(dest):
   721     if os.path.lexists(dest):
   722         unlink(dest)
   722         unlink(dest)
   723     if hardlink:
   723     # hardlinks are problematic on CIFS, quietly ignore this flag
       
   724     # until we find a way to work around it cleanly (issue4546)
       
   725     if False or hardlink:
   724         try:
   726         try:
   725             oslink(src, dest)
   727             oslink(src, dest)
   726             return
   728             return
   727         except (IOError, OSError):
   729         except (IOError, OSError):
   728             pass # fall back to normal copy
   730             pass # fall back to normal copy