名称

pre-lock — 路径锁定尝试的通知。

描述

The pre-lock hook runs whenever someone attempts to lock a path. It can be used to prevent locks altogether or to create a more complex policy specifying exactly which users are allowed to lock particular paths. If the hook notices a pre-existing lock, then it can also decide whether a user is allowed to “steal” the existing lock.

If the pre-lock hook program returns a nonzero exit value, the lock action is aborted and anything printed to stderr is marshalled back to the client.

输入参数

传递给你钩子程序的命令行参数,按照顺序是:

  1. Repository path

  2. Versioned path that is to be locked

  3. Authenticated username of the person attempting the lock

普通用户

Access control