equal
deleted
inserted
replaced
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) |