##// END OF EJS Templates
rename util.os_link to oslink
Adrian Buehlmann -
r14235:b9e1b041 default
parent child Browse files
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_link(indexfn, oldindexfn)
255 ignoremissing(util.os_link)(datafn, olddatafn)
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_link(src, dst)
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_link = os.link
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_link(src, dst)
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_link(f1, f2)
627 oslink(f1, f2)
628 628 except OSError:
629 629 return False
630 630
@@ -140,7 +140,7 b' def _getfileinfo(name):'
140 140 finally:
141 141 _kernel32.CloseHandle(fh)
142 142
143 def os_link(src, dst):
143 def oslink(src, dst):
144 144 try:
145 145 if not _kernel32.CreateHardLinkA(dst, src, None):
146 146 _raiseoserror(src)
General Comments 0
You need to be logged in to leave comments. Login now