Merge with stable
authorMartin Geisler <mg@aragost.com>
Wed, 02 Jun 2010 14:40:31 +0200
changeset 11268 f73baa069113
parent 11266 2b440bb8a66b (current diff)
parent 11267 d3ebb1a0bc49 (diff)
child 11269 5f01fd602542
Merge with stable
contrib/shrink-revlog.py
--- a/contrib/shrink-revlog.py	Wed May 19 18:06:35 2010 +0200
+++ b/contrib/shrink-revlog.py	Wed Jun 02 14:40:31 2010 +0200
@@ -254,9 +254,14 @@
             # copy files
             util.os_link(indexfn, oldindexfn)
             ignoremissing(util.os_link)(datafn, olddatafn)
+
+            # mkstemp() creates files only readable by the owner
+            os.chmod(tmpindexfn, os.stat(indexfn).st_mode)
+
             # rename
             util.rename(tmpindexfn, indexfn)
             try:
+                os.chmod(tmpdatafn, os.stat(datafn).st_mode)
                 util.rename(tmpdatafn, datafn)
             except OSError, inst:
                 if inst.errno != errno.ENOENT: