sapling/eden/fs/service
Michael Bolin 634e96872e Add initial support for hooks akin to Git hooks for Eden.
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
2016-09-26 13:53:05 -07:00
..
oss Initial commit 2016-05-12 14:09:13 -07:00
__init__.py Refactor logic to create a EdenService.Client in Python. 2016-05-25 21:44:07 -07:00
client.py make sure to close the thrift socket 2016-07-22 17:33:05 -07:00
DEFS eden: re-do overlay serialization 2016-09-09 16:57:58 -07:00
eden.stream.thrift additional query API for our thrift interface 2016-09-26 13:52:25 -07:00
eden.thrift implement getFilesChangedSince 2016-09-26 13:52:25 -07:00
EdenServer.cpp New Thrift endpoint: getBindMounts(mountPoint). 2016-09-12 18:29:15 -07:00
EdenServer.h New Thrift endpoint: getBindMounts(mountPoint). 2016-09-12 18:29:15 -07:00
EdenServiceHandler.cpp Add initial support for hooks akin to Git hooks for Eden. 2016-09-26 13:53:05 -07:00
EdenServiceHandler.h implement getFileInformation 2016-09-26 13:52:25 -07:00
main.cpp add ClientConfig method that compiles repository data 2016-08-05 12:50:29 -07:00
TARGETS additional query API for our thrift interface 2016-09-26 13:52:25 -07:00