Homec4science

Add 'hook.d/' directories to SVN and Git repositories for custom hooks

Authored by epriestley <git@epriestley.com> on Jan 3 2014, 21:26.

Description

Add 'hook.d/' directories to SVN and Git repositories for custom hooks

Summary:
Fixes T4189. Ref T4151. Allows repositories to have additional custom hooks for operations which can't be expressed with Herald (one such operation is lint).

This adds only local hook directories, since they're easier to use with existing hooks than global directories. I might add global directories eventually.

This doesn't support Mercurial since we have no demand for it and it's more complicated (we lose compatibility and power by just dropping a hooks.d/ somewhere).

Test Plan:

  • Pulled hosted SVN and Git repos to verify the hook directories generate correctly.
  • Added a variety of hooks to the hook directories (echo + pass, fail).
  • Pushed commits and verified the hooks fired (output expected info, or failed).
  • Verified push log reflected the correct error code ("3", external) and detail ("nope.sh") when rejecting.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4151, T4189

Differential Revision: https://secure.phabricator.com/D7884

Details

Committed
epriestley <git@epriestley.com>Jan 3 2014, 21:26
Pushed
aubortJan 31 2017, 17:16
Parents
rPH2cfc3acf3234: Allow Herald pre-commit rules to act on repository projects
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH972dfa7bfc37: Add 'hook.d/' directories to SVN and Git repositories for custom hooks (authored by epriestley <git@epriestley.com>).Jan 3 2014, 21:26