mercurial/util.py
changeset 14235 b9e1b041744f
parent 14234 600e64004eb5
child 14250 34ec9b313638
equal deleted inserted replaced
14234:600e64004eb5 14235:b9e1b041744f
   433             hardlink, n = copyfiles(srcname, dstname, hardlink)
   433             hardlink, n = copyfiles(srcname, dstname, hardlink)
   434             num += n
   434             num += n
   435     else:
   435     else:
   436         if hardlink:
   436         if hardlink:
   437             try:
   437             try:
   438                 os_link(src, dst)
   438                 oslink(src, dst)
   439             except (IOError, OSError):
   439             except (IOError, OSError):
   440                 hardlink = False
   440                 hardlink = False
   441                 shutil.copy(src, dst)
   441                 shutil.copy(src, dst)
   442         else:
   442         else:
   443             shutil.copy(src, dst)
   443             shutil.copy(src, dst)
   622 
   622 
   623     f2 = testfile + ".hgtmp2"
   623     f2 = testfile + ".hgtmp2"
   624     fd = None
   624     fd = None
   625     try:
   625     try:
   626         try:
   626         try:
   627             os_link(f1, f2)
   627             oslink(f1, f2)
   628         except OSError:
   628         except OSError:
   629             return False
   629             return False
   630 
   630 
   631         # nlinks() may behave differently for files on Windows shares if
   631         # nlinks() may behave differently for files on Windows shares if
   632         # the file is open.
   632         # the file is open.