changeset 1521:11a58d2cdffb

copy the mode of the file when breaking hardlinks
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Wed, 09 Nov 2005 13:38:46 -0800
parents 5b19dea9d4fd
children d07d729ce306
files mercurial/util.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/util.py	Wed Nov 09 12:52:05 2005 -0800
+++ b/mercurial/util.py	Wed Nov 09 13:38:46 2005 -0800
@@ -387,6 +387,8 @@
                         except: pass
                         raise
                     fp.close()
+                    st = os.lstat(f)
+                    os.chmod(temp, st.st_mode)
                     rename(temp, f)
 
         return file(f, mode)