Show More
@@ -202,9 +202,14 b' def shrink(ui, repo, **opts):' | |||
|
202 | 202 | # copy files |
|
203 | 203 | util.os_link(indexfn, oldindexfn) |
|
204 | 204 | ignoremissing(util.os_link)(datafn, olddatafn) |
|
205 | ||
|
206 | # mkstemp() creates files only readable by the owner | |
|
207 | os.chmod(tmpindexfn, os.stat(indexfn).st_mode) | |
|
208 | ||
|
205 | 209 | # rename |
|
206 | 210 | util.rename(tmpindexfn, indexfn) |
|
207 | 211 | try: |
|
212 | os.chmod(tmpdatafn, os.stat(datafn).st_mode) | |
|
208 | 213 | util.rename(tmpdatafn, datafn) |
|
209 | 214 | except OSError, inst: |
|
210 | 215 | if inst.errno != errno.ENOENT: |
General Comments 0
You need to be logged in to leave comments.
Login now