Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 14235:b9e1b041744f
rename util.os_link to oslink
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Fri, 06 May 2011 15:34:34 +0200 |
parents | 600e64004eb5 |
children | 34ec9b313638 |
comparison
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. |