[RFC] per-branch umask
Harald Meland
harald.meland at usit.uio.no
Sun Dec 18 00:32:00 GMT 2005
[John Arbash Meinel]
> The problem with the group sticky bit is that it just sets the group, it
> doesn't set the writable bit. Which means if you don't set your umask,
> you have to periodically run a chmod -R g+w *, if any directories had
> been created.
I haven't actually tried this, but I think it would work; it is
probably only a workaround, though, and not a good,
easy-to-understand, permanent solution to the problem of
multi-committer branches:
You could pre-create the directories '.bzr' and '.bzr/weaves' with
group-writable permissions in the shared branch(es), and somehow trick
the branch into using format 5.
If you'd like the shared branch to be format 6, you'd have to also
pre-create all the 512 '.bzr/weaves/XX' and '.bzr/revision-store/XX'
directories with group-writeable permissions.
If all your developers use umask 022, new files will be readable for
everyone, but not writable for other members of the group. However,
as the file lives in a directory which *is* group writable, both
rename(tempfile, non-group-writable-file) and
unlink(non-group-writable-file) will work; I *think* this is enough
for both AtomicFile and all the current Transports to work.
You could also consider setting the sticky bit (chmod +t) on
directories whose files should never change once written, i.e. the
revision-store. That way, only the user who actually committed a
revision will be allowed to remove/rename/modify that file in the
revision-store.
--
Harald
More information about the bazaar
mailing list