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.
--- 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: