Show More
@@ -251,8 +251,8 b' def shrink(ui, repo, **opts):' | |||
|
251 | 251 | if not opts.get('dry_run'): |
|
252 | 252 | # racy, both files cannot be renamed atomically |
|
253 | 253 | # copy files |
|
254 |
util.os |
|
|
255 |
ignoremissing(util.os |
|
|
254 | util.oslink(indexfn, oldindexfn) | |
|
255 | ignoremissing(util.oslink)(datafn, olddatafn) | |
|
256 | 256 | |
|
257 | 257 | # rename |
|
258 | 258 | util.rename(tmpindexfn, indexfn) |
@@ -132,7 +132,7 b' def do_relink(src, dst, files, ui):' | |||
|
132 | 132 | bak = dst + '.bak' |
|
133 | 133 | os.rename(dst, bak) |
|
134 | 134 | try: |
|
135 |
util.os |
|
|
135 | util.oslink(src, dst) | |
|
136 | 136 | except OSError: |
|
137 | 137 | os.rename(bak, dst) |
|
138 | 138 | raise |
@@ -12,7 +12,7 b' posixfile = open' | |||
|
12 | 12 | nulldev = '/dev/null' |
|
13 | 13 | normpath = os.path.normpath |
|
14 | 14 | samestat = os.path.samestat |
|
15 |
os |
|
|
15 | oslink = os.link | |
|
16 | 16 | unlink = os.unlink |
|
17 | 17 | rename = os.rename |
|
18 | 18 | expandglobs = False |
@@ -435,7 +435,7 b' def copyfiles(src, dst, hardlink=None):' | |||
|
435 | 435 | else: |
|
436 | 436 | if hardlink: |
|
437 | 437 | try: |
|
438 |
os |
|
|
438 | oslink(src, dst) | |
|
439 | 439 | except (IOError, OSError): |
|
440 | 440 | hardlink = False |
|
441 | 441 | shutil.copy(src, dst) |
@@ -624,7 +624,7 b' def checknlink(testfile):' | |||
|
624 | 624 | fd = None |
|
625 | 625 | try: |
|
626 | 626 | try: |
|
627 |
os |
|
|
627 | oslink(f1, f2) | |
|
628 | 628 | except OSError: |
|
629 | 629 | return False |
|
630 | 630 |
General Comments 0
You need to be logged in to leave comments.
Login now