mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 15:57:43 +03:00
634e96872e
Summary: This design is inspired by that of Git hooks: https://git-scm.com/docs/githooks By default, `/etc/eden/hooks` should be the place where Eden looks for hooks; however, this can be overridden in `~/.edenrc` on a per-`repository` basis. This directory should be installed as part of installing Eden. There is information in `eden/hooks/README.md` about this. The first hook that is supported is for post-clone logic for a repository. This change demonstrates the need for an `eden config --get <value>` analogous to what Git has, as hooks should be able to leverage this in their own scripts. There introduces a `TODO` in `post-clone.py` where such a feature would be useful, so that I could add the following to my `~/.edenrc` to develop the Eden extension for Hg: ``` [hooks] hg.edenextension = /data/users/mbolin/fbsource/fbcode/eden/hg/eden [repository fbsource] path = /data/users/mbolin/fbsource type = hg hooks = /data/users/mbolin/eden-hooks ``` Note that this revision also introduces a `generate-hooks-dir` script that can be used to generate the standard `/etc/eden/hooks` directory that we intend to distribute with Eden. This is also useful in creating the basis for a custom `hooks` directory that can be specified as shown above in an `~/.edenrc` file. Reviewed By: simpkins Differential Revision: D3858635 fbshipit-source-id: 215ca26379a4b3b0a07d50845fd645b4d9ccf0f2 |
||
---|---|---|
.. | ||
oss | ||
__init__.py | ||
client.py | ||
DEFS | ||
eden.stream.thrift | ||
eden.thrift | ||
EdenServer.cpp | ||
EdenServer.h | ||
EdenServiceHandler.cpp | ||
EdenServiceHandler.h | ||
main.cpp | ||
TARGETS |