This text is a work in progress—highly subject to change—and may not accurately describe any released version of the Apache™ Subversion® software. Bookmarking or otherwise referring others to this page is probably not such a smart idea. Please visit http://www.svnbook.com/ for stable versions of this book.
pre-lock — Notification of a path lock attempt.
pre-lock
REPOS-PATH
PATH
USER
COMMENT
STEAL
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 preexisting lock,
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.
The hook program may optionally dictate the lock token which will be assigned to the lock by printing the desired lock token to standard output. Because of this, implementations of this hook should carefully avoid unexpected output sent to standard output.
Warning | |
---|---|
If the |
The command-line arguments passed to the hook program, in order, are:
Repository path
Versioned path that is to be locked
Authenticated username of the person attempting the lock
Comment provided when the lock was created
1
if the user is attempting to
steal an existing lock; 0
otherwise