Proposal: project hooks and policies

Jonathan S. Shapiro shap at eros-os.com
Thu Mar 6 04:27:47 CST 2008


On Wed, 2008-03-05 at 12:12 -0800, Bryan O'Sullivan wrote:
> Jonathan S. Shapiro wrote:
> 
> > Security is provided by the fact that the user can delete or comment out
> > (or simply never add) the rcpath entry, in which case the imported HGRC
> > will not be loaded and none of its directives will have any effect.
> 
> This looks reasonable, but I don't see the connection between this
> mechanism and enforcement of a policy.  If a project's policy is to have
> source files in the working directory represented with native line
> endings using the encode and decode hooks, I can sort of see how this
> mechanism might make that possible, but I can't see how or if it would
> make it *required*.  Can you fill me in?

The "required policy" part came more from the way I intend to *use* this
mechanism, which is to implement commit and pre-txn hooks in that policy
repo. On reflection, that's orthogonal to the proposal itself.

Aside from the missing RC import mechanism, you could set all of this up
right now. What I'm thinking here is that you can probably get
contributors to clone a hook+extension repo and authorize use of it when
they set up their first project repository.

So the problem I'm really after solving is to preserve that import
across clone and ensure that there is a [de]authorization point.

shap



More information about the Mercurial-devel mailing list