Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Repository Hooks > pre-lock

Name

pre-lock — Notification of a path lock attempt.

Description

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 marshaled back to the client.

Input parameter(s)

The command-line arguments passed to the hook program, in order, are:

  1. Repository path

  2. Versioned path that is to be locked

  3. Authenticated username of the person attempting the lock


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint