[RFC] per-branch umask
Robert Collins
robertc at robertcollins.net
Thu Dec 15 06:09:21 GMT 2005
On Tue, 2005-12-13 at 12:59 -0600, John Arbash Meinel wrote:
> John Arbash Meinel wrote:
> ...
>
> > I'm not sure when to set umask, since if you pull from another branch,
> > you should only use the local umask. I'm pretty sure we currently
> > don't have any operations which write to 2 branches at the same time.
> > So we probably could get away with only setting the umask once.
> > Perhaps just when we call 'branch.lock_write()'. Is that sane?
>
> I just realized that with bound branches, you have to be more careful
> than this. Since you will update the bound branch, and the local one,
> and the umask can definitely be different between them.
> Anyone else have a better idea of when to set the umask? The best I have
> right now is to set/unset it before each operation. Which seems like we
> can do better than that.
IMO we should never alter umask, thats really very evil. We don't know
what callers are doing - they may have us in threads for instance. (Same
principle as not chdiring() in a library).
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051215/81169c18/attachment.pgp
More information about the bazaar
mailing list