If Mercurial does not track file permissions by default, how does it decide on the permissions for any files/directories it creates?
Does it use umask
? If not, what does it use?
I have read in the mail list the following:
Mercurial uses the mode of the .hg/store directory to compute a mask
but this seems a bit arbitrary (if there is any explanation behind it, I'd love to hear it). Is this explained in the documentation?
There doesn't seem to be any complete explanation, only a mention of it in the "How To Handle Multiple Committers" page:
If you are using a version of Mercurial older than 1.0, it's important that each user's
umask
be set to002
or something similar. If it's set to022
, group write privileges will be masked off for files that users create, causing other users to be unable to modify them.You can change the default
umask
for a user by editing their~/.profile
and adding the line...
umask 002
Alternatively, you can edit
/etc/profile
to change the system-wide settings.
Changing the/etc/profile
will not work if people check in stuff with thehg
command, as that file isn't read by non-interactive shells,/etc/bash.bashrc
is a better place to put the system-wide settings.Otherwise since Mercurial 1.0, the default permission is inherited from .hg/store.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With