# HG changeset patch # User Benoit Boissinot # Date 1131572326 28800 # Node ID 11a58d2cdffb9d4a4b856b879b6335f6f5ef4a54 # Parent 5b19dea9d4fdec823d671cdfd29e65c4895d2b69 copy the mode of the file when breaking hardlinks diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -387,6 +387,8 @@ def opener(base): except: pass raise fp.close() + st = os.lstat(f) + os.chmod(temp, st.st_mode) rename(temp, f) return file(f, mode)