防止 perforce 在检入文件时为所有用户切换执行位

Prevent perforce from toggling the execute bit for all users when checking in files

在签入文件时,如何通过图形客户端强制为所有人保留执行位,而不仅仅是为用户和组保留执行位?

现在我所做的是右键单击文件 -> 更改文件类型 -> 然后勾选 exec bit set in workspace option。这确实保留了执行位,但仅针对用户和文件组(据我了解,这等同于 this 问题中描述的过程)。

如何让它为所有人保留执行位?

插图。

签入前:

-rwxr-x--x  1 user group_name    0 Jul 20 14:14 test_file
         ^

签入后:

-r-xr-x---  1 user group_name    0 Jul 20 14:24 test_file
         ^

将文件类型更改为 +x 以自动设置可执行位。

据我所知,p4 尊重您的 umask 配置,因此这可能是您的 umask:

的问题
$ umask -S
u=rwx,g=rx,o=rx

$ p4 sync -f some_script
//depot/path/some_script#1 - refreshing /client/path/some_script

$ ls -algGF some_script
-r-xr-xr-x 1 0 Jul 21 04:13 some_script*

$ umask o=
$ umask -S
u=rwx,g=rx,o=

$ p4 sync -f some_script
//depot/path/some_script#1 - refreshing /client/path/some_script

$ ls -algGF some_script
-r-xr-x--- 1 0 Jul 21 04:14 some_script*