Mercurial > hg
comparison contrib/shrink-revlog.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 | 1f667030b139 |
children | dbdb777502dc |
comparison
equal
deleted
inserted
replaced
14234:600e64004eb5 | 14235:b9e1b041744f |
---|---|
249 ignoremissing(os.unlink)(fn) | 249 ignoremissing(os.unlink)(fn) |
250 raise | 250 raise |
251 if not opts.get('dry_run'): | 251 if not opts.get('dry_run'): |
252 # racy, both files cannot be renamed atomically | 252 # racy, both files cannot be renamed atomically |
253 # copy files | 253 # copy files |
254 util.os_link(indexfn, oldindexfn) | 254 util.oslink(indexfn, oldindexfn) |
255 ignoremissing(util.os_link)(datafn, olddatafn) | 255 ignoremissing(util.oslink)(datafn, olddatafn) |
256 | 256 |
257 # rename | 257 # rename |
258 util.rename(tmpindexfn, indexfn) | 258 util.rename(tmpindexfn, indexfn) |
259 try: | 259 try: |
260 os.chmod(tmpdatafn, os.stat(datafn).st_mode) | 260 os.chmod(tmpdatafn, os.stat(datafn).st_mode) |