Exclude command for users

Augie Fackler raf at durin42.com
Mon Aug 20 19:25:59 UTC 2018



> On Aug 17, 2018, at 05:18, AMGHAR TOUFFIK <tamghar at groupeastek.fr> wrote:
> 
> Thank you for this help.
> 
> I'm going to use unix groups to disable some commands.
> May be  looking for a way to overload hg command by a Mercurial hook.

You could probably do this in the way Boris suggested, eg:

[hooks]
pre-strip=fail-if-not-in-some-group.sh

where `fail-if-not-in-some-group.sh` is a script that exits nonzero if the user isn't in the required group. Naturally, this will be on the honor system, users can choose to distrust your hgrc or override the config entry in their personal config, but as long as you only need this to provide guidelines for people, it'll probably do.



More information about the Mercurial mailing list