名称

pre-unlock — 路径解锁尝试的通知。

描述

The pre-unlock hook runs whenever someone attempts to remove a lock on a file. It can be used to create policies that specify which users are allowed to unlock particular paths. It's particularly important for determining policies about lock breakage. If user A locks a file, is user B allowed to break the lock? What if the lock is more than a week old? These sorts of things can be decided and enforced by the hook.

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

输入参数

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

  1. Repository path

  2. Versioned path which is to be locked

  3. Authenticated username of the person attempting the lock

普通用户

Access control