sapling/eden/hooks
Andrew Gallagher 03bdaff954 codemod: format TARGETS with buildifier [4/5] (D5092623)
Reviewed By: igorsugak

fbshipit-source-id: 277a9d2bdc1d7e3ff3075bfe2d7307502fd0a507
2017-06-01 17:52:40 -07:00
..
hg codemod: format TARGETS with buildifier [4/5] (D5092623) 2017-06-01 17:52:40 -07:00
generate-hooks-dir Update script because --into was changed to --out. 2017-01-09 16:02:04 -08:00
README.md Add initial support for hooks akin to Git hooks for Eden. 2016-09-26 13:53:05 -07:00

Eden hooks

When Eden is deployed, the output of generate-hooks-dir should be installed in /etc/eden/hooks.

By default, Eden will look in /etc/eden/hooks for hooks. This can be overridden by specifying hooks in the [repository] section of an ~/.edenrc.

Note that hooks may require additional configuration. Hook authors should encourage users to specify such configuration in ~/.edenrc. This can be read from the hook via eden config.

The following files will be recognized in the hooks directory for the appropriate event:

post-clone

This will be run after eden clone. If the <repo_type> is .hg, the script is responsible for creating the .hg directory in the root of the Eden mount. It will receive the following arguments:

/etc/eden/hooks/hg/post-clone <repo_type> <eden_checkout> <repo>
  • <repo_type> is hg or git
  • <eden_checkout> is the path to the mounted Eden checkout.
  • <repo> is the path to the original Mercurial repository.