arean / Porjay Public

Porjay: distributed version control and code hosting, built on Fossil SCM

Help: hook

The "hook" command:

Usage: porjay hook COMMAND ...

Commands include:

porjay hook add --command COMMAND --type TYPE --sequence NUMBER

Create a new hook. The --command and --type arguments are required. --sequence is optional.

porjay hook delete ID ...

Delete one or more hooks by their IDs. ID can be "all" to delete all hooks. Caution: There is no "undo" for this operation. Deleted hooks are permanently lost.

porjay hook edit --command COMMAND --type TYPE --sequence NUMBER ID ...

Make changes to one or more existing hooks. The ID argument is either a hook-id, or a list of hook-ids, or the keyword "all". For example, to disable hook number 2, use:
porjay hook edit --type disabled 2

porjay hook list

Show all current hooks

porjay hook status

Print the values of CONFIG table entries that are relevant to hook processing. Used for debugging.

porjay hook test [OPTIONS] ID

Run the hook script given by ID for testing purposes. Options:
--dry-run
Print the script on stdout rather than run it
--base-rcvid N
Pretend that the hook-last-rcvid value is N
--new-rcvid M
Pretend that the last rcvid value is M
--aux-file NAME
NAME is substituted for %A in the script

The --base-rcvid and --new-rcvid options are silently ignored if the hook type is not "after-receive". The default values for --base-rcvid and --new-rcvid cause the last receive to be processed.