[PATCH 0 of 2 ] acl: use of "!" prefix in user or group names

elifarley at gmail.com elifarley at gmail.com
Mon May 28 18:21:00 CDT 2012


acl: use of "!" prefix in user or group names

The "!" prefix allows you to prevent anyone except a given user or group
to push changesets in a given branch or path.

This patch enables a use case suggested by a user (Julien Bonnet):
There's a branch that only a given user (or group) should be able to push
to, and you don't want to restrict access to any other branch that may be
created.

With the "!" prefix, you simply deny access to "!givenuser" (or "!@givengroup").
Configuration examples below:

#=========================

[acl.deny.branches]
# only 'givenuser' can commit to branch 'default';
# 'givenuser' and anyone else can still use any other branch.
default = !givenuser

#=========================

You can also deny access based on file paths:

#=========================

[acl.deny]
# only 'givenuser' can change the file below;
# 'givenuser' and anyone else can still change any other file.
/path/to/file = !givenuser

#=========================


More information about the Mercurial-devel mailing list