changeset 52553:dd052842fc8e

rhg: set group-writable checkisexec file permissions in Python This actually achieves what the parent commit tried to do, but on the Python side. Unfortunately, `mkstemp` doesn't seem to let us specify the initial file permissions so we have to apply umask by hand when chmodding.
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Thu, 05 Dec 2024 15:16:43 +0000
parents 66e34bc44280
children 64a618048ba8
files mercurial/posix.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/posix.py	Thu Dec 05 13:17:32 2024 +0000
+++ b/mercurial/posix.py	Thu Dec 05 15:16:43 2024 +0000
@@ -300,6 +300,7 @@
             os.close(fh)
             m = os.stat(fn).st_mode
             if m & EXECFLAGS == 0:
+                m = 0o666 & ~umask
                 os.chmod(fn, m & 0o777 | EXECFLAGS)
                 if os.stat(fn).st_mode & EXECFLAGS != 0:
                     if checkisexec is not None: