Inner GitLab hooks for native Mercurial repositories
For the initial exposition of native (HGitaly) Mercurial repositories in Heptapod, we will need the inner hooks sent from the Mercurial processes to contain Mercurial Node IDs (SHAs) instead of their Git counterpart.
Since we are a long way to replace the existing `hg-git` backed repositories, we'll need it to be conditional. Overall this will all components, except HGitaly itself:
- [x] py-heptapod: introduce a new `heptapod.native` configuration item, defaulting to `False`. If `True`, send Mercurial SHAs in the hooks. In later milestones, the same configuration item will be used to bypass conversion to Git entirely
- [x] py-heptapod: introduce a special HTTP header (e.g., `X-HEPTAPOD-HG-NATIVE` and have the WSGI application interpret it to set the value of `heptapod.native`
- [x] py-heptapod: also react to the `HEPTAPOD_HG_NATIVE` environment variable to set the value of `heptapod.native`
- [ ] Rails: make sure the internal API endpoint used by Shell provides the `vcs_type` information
- [ ] Rails: provide a way to include `vcs_type` information in responses to Workhorse (probably will be a special header, could even be the same one as understood by `py-heptapod`)
- [x] Shell: read `vcs_type` from the internal API payload, and use it to ~~pass `--config heptapod.native` on the command line~~ set `HEPTAPOD_HG_NATIVE` environment variable
- [x] Workhorse: pass the appropriate `X-HEPTAPOD-HG-NATIVE` header to the Mercurial HTTP backend
- [ ] Rails: pass `--config heptapod.native` on the command line or set `HEPTAPOD_HG_NATIVE` environment variable for all direct `hg` calls.
issue