mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 01:07:15 +03:00
0f4ba60602
Summary: Now that we make use of the `.hg/dirstate` file, we should ensure that it is initialized correctly. This takes the commit hash from the `SNAPSHOT` file and passes it as an argument to the `post-clone` hook. In the Hg `post-clone` hook, it writes the `.hg/dirstate` file such that the first 20 bytes are the binary version of the commit hash and the next 20 bytes are nul bytes. Reviewed By: simpkins Differential Revision: D6174440 fbshipit-source-id: 29d17f88ca3f63fa6490e1db88bc2121aced74d6 |
||
---|---|---|
.. | ||
hg | ||
generate-hooks-dir | ||
README.md |
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>
ishg
orgit
<eden_checkout>
is the path to the mounted Eden checkout.<repo>
is the path to the original Mercurial repository.<hash>
is the hex id of the initial commit